Skip to main content



      Home
Home » Modeling » EMF » Creating OrderBy annotation for OneToMany
Creating OrderBy annotation for OneToMany [message #1748966] Wed, 30 November 2016 09:55 Go to next message
Eclipse UserFriend
Hello,

I use EMF to model my entities and texo the create JPA annotated classes. What I cannot model directly, I do with the annotation model. Up to now I could model everything I needed. Except the following:

@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "parameters", orphanRemoval = true)
@OrderBy("id")
private Set<Parameter> parameters;

What I want: I'd like to query the list of parameters in the order they where inserted in the database. I don't want an extra table nor an OrderColumn. With plain JPA it works but I cannot make texo to add the @OrderBy annotation.

Is this possible? How?

Kind regards,
Michael Wyraz.
Re: Creating OrderBy annotation for OneToMany [message #1749161 is a reply to message #1748966] Fri, 02 December 2016 08:15 Go to previous message
Eclipse UserFriend
Hi Michael,
Yes it should be possible. What does get generated in the source code?

Another option/thing you can try is put the orderBy as a property of the OneToMany.

But when I check the source code it should work either way.

If you post the relevant part of the annotations model here then I can take a look and create a testcase for it also.

gr. Martin
Previous Topic:Validation on save
Next Topic:[CDO] First pass through resource contents slow?
Goto Forum:
  


Current Time: Mon Jul 07 10:55:22 EDT 2025

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

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

Back to the top