Check out the @OrderBy annotation.
romsrini wrote:
I guess what I'm really asking is if there is a way to do the sort in the
database for a collection returned from a join.
For example, given the following code snippet from org.appfuse.model.User:
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(
name="user_role",
joinColumns = { @JoinColumn( name="user_id") },
inverseJoinColumns = @JoinColumn( name="role_id")
)
public Set<Role> getRoles() {
return roles;
}
Is there a declarative way to sort the roles? I know I can make the result
be a List and then sort the List in memory in Java, but I was hoping there
was a way to do it in the database using the appfuse framework.
Thanks,
Rom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]