Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Re: Descriptor Events on Entities which have not been modified during a Transaction
Re: Descriptor Events on Entities which have not been modified during a Transaction [message #758011] Mon, 21 November 2011 18:24 Go to next message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
Why don't you use the @OrderColumn?

Or, can you maintain the index in your model, just update the index every time you add or remove from the collection, such as defining add/remove methods on your class.

For using events, why would you want events from objects that did not change?
--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/
Re: Descriptor Events on Entities which have not been modified during a Transaction [message #758196 is a reply to message #758011] Tue, 22 November 2011 09:59 Go to previous message
J F is currently offline J FFriend
Messages: 256
Registered: July 2009
Senior Member
Thanks again James.


The reason for the example was to see whether there were any other techniques that could be used to manage a collection of objects which derived state from their position in a List. The reason for not doing this at the time of inserting/removing other items is just that it means doing it all the time, not on some final event. Before I rewrote this I wanted to make sure I was not missing something that I could get for free from Eclipselink, I wasn't sure from the docs whether the PreWrite event was available on all Entities or not.

Its not an issue and I can see the benefits/difficulties of calculating the changes once and not firing events on unchanged entities.
Previous Topic:Descriptor Events on Entities which have not been modified during a Transaction
Next Topic:not persisted values are lost when cloning
Goto Forum:
  


Current Time: Fri Sep 20 00:09:32 GMT 2024

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

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

Back to the top