OrderBy « Seam « JPA Q&A





1. How do you specify OrderBy clause on two columns    stackoverflow.com

We would like to orderBy 2 columns in the Seam EntityQuery interface as well as the JPA model. How do we do this?

@Entity
public class A{

@OrderBy(???) // should this be hardcoded here, ...

2. OrderBy javax vs hibernate    seamframework.org

I have two classes : abstract Location, Country and Province. Country has collection of provinces and it should be ordered by province name. Name attribute is defined in Location. If I used javax.persistence.OrderBy annotation on it then everything works fine in production and dev profile, but in test entityManager creates such query :