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 13:24 Go to next message
James is currently offline James
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 04:59 Go to previous message
J F is currently offline J F
Messages: 242
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: Sat Jul 26 01:08:07 EDT 2014

Powered by FUDForum. Page generated in 0.30293 seconds