[TEXO] OrderBy for OneToMany [message #1153084] |
Thu, 24 October 2013 07:18  |
Eclipse User |
|
|
|
I've set the orderBy property of a OneToMany annotation in my annotations model and am not getting an OrderBy annotation in my generated Java. I've had a quick look at the EReferenceORMAnnotator class and it looks like there is currently no way to order the contents of a retrieved list. Is this correct, or have I missed something?
|
|
|
Re: [TEXO] OrderBy for OneToMany [message #1153171 is a reply to message #1153084] |
Thu, 24 October 2013 08:25  |
Eclipse User |
|
|
|
Hi Andy,
If you manually set an orderBy it should normally be transferred to the annotation in java, the EReferenceORMAnnotator
only adds an orderby if needed but does not unset it.
Can you remove the OneToMany annotation manually from the source file? And then regenerate it.
There is a change that indeed orderBy does not work in combination with lists. With list implementations the order is
normally defined by the list index, so the order in which the application places objects in the list.
If you generate the orm.xml do you see the orderby correctly there?
If you have a small testmodel showing the issue then please enter a bugzilla and I can take a look at it.
gr. Martin
On 10/24/2013 01:18 PM, Andy Carpenter wrote:
> I've set the orderBy property of a OneToMany annotation in my annotations model and am not getting an OrderBy annotation
> in my generated Java. I've had a quick look at the EReferenceORMAnnotator class and it looks like there is currently no
> way to order the contents of a retrieved list. Is this correct, or have I missed something?
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.06640 seconds