Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to get modified model objects
How to get modified model objects [message #418261] Wed, 09 April 2008 09:26 Go to next message
Gemma Bowers is currently offline Gemma BowersFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,
I've implemented my own EMF resource which retrieves data from a database.
In the save method, I'd like to get hold of the modified EMF model objects
and then update the equivalent objects in the database.
I've considered using a ChangeRecorder but this might be overkill for what
I need. Also, I know there's a Resource.getContents(), but this returns
all of the model objects, not just the changed ones.
Does anyone have any ideas?
Thanks,
Gemma
-
Re: How to get modified model objects [message #418268 is a reply to message #418261] Wed, 09 April 2008 11:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Gemma,

Comments below.

Gemma wrote:
> Hi,
> I've implemented my own EMF resource which retrieves data from a
> database. In the save method, I'd like to get hold of the modified EMF
> model objects and then update the equivalent objects in the database.
> I've considered using a ChangeRecorder but this might be overkill for
> what I need. Also, I know there's a Resource.getContents(), but this
> returns all of the model objects, not just the changed ones.
> Does anyone have any ideas?
Automatically attaching a change recorder will certainly provide the
information you need in terms of what's change and hence will allow you
to produce a minimal set up updates to the data base. I can't think of
a better way. I imagine Teneo is using Hibernate/JPox/EclipseLink to do
something similar (but at the object level without EMF's help) under the
covers.
> Thanks,
> Gemma
> -


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:behavior when changing the key of an EStringToStringMapEntry
Next Topic:XML serialization of non-containment reference
Goto Forum:
  


Current Time: Thu Apr 25 04:00:47 GMT 2024

Powered by FUDForum. Page generated in 0.04811 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top