|
|
|
Re: OneToMany list contains null entries when using OrderBy and shared cache [message #661394 is a reply to message #661321] |
Thu, 24 March 2011 13:58 |
Chris Delahunt Messages: 1389 Registered: July 2009 |
Senior Member |
|
|
That reference is out of context, and is not a warning that orderby does not work. It is a warning that the objects read in might come from the cache, but the @OrderBy only applies when the collection is read in from the database - essentially stating that the JPA provider does not maintain the list order for you. So if you make changes to the list, the next time you read the owner, you may see the list in the same order as you left it in - depending on if the object was in the cache or if it had to be built/refreshed from the database since your changes were made.
There was a problem with nulls, but is was a specific situation involving attribute change tracking and merging that does not seem to be occuring here. As your attempt to reproduce shows, it is not a common situation, or one that we have seen before (that I am aware of) and likely a product of a specific set of conditions in your application. As the last issue I was aware of dealt with change tracking, I figure that is a good place to start in isolating the issue though it is difficult to guess.
Best Regards,
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.02429 seconds