1. Order By related object field forum.hibernate.org |
2. order by field in nested class forum.hibernate.orgHi all i'm beginners, i have to do a sort by a fiel in a nested class...i'll explain better. I've a class Node wich have a subclass Category with the following configuration ... @ManyToMany(cascade={CascadeType.PERSIST, CascadeType.MERGE}) @JoinTable( name="category_node", joinColumns={@JoinColumn(name="nodeId")}, inverseJoinColumns={@JoinColumn(name="categoryId")} ) public Set |
3. How To: Hibernate creates a table with specific fields order forum.hibernate.org |
4. Order sql by calculated field forum.hibernate.orghi everyone, Im trying to order by a calculated field but has been no possible this is the code. String sqlCountUserActions = "..."; ProjectionList projList = Projections.projectionList(); projList.add(Projections.property("id"),"id"); projList.add(Projections.property("name"),"name"); projList.add(Projections.sqlProjection(sqlCountUserActions, new String[] { "countActions" }, new org.hibernate.type.Type[] { Hibernate.LONG })); crit.addOrder((Order.asc("countActions"))); When I try this code always I got the error that 'countActions' doesnt exist in my class like a property... ... |
5. Apply MySQL's ORDER BY FIELD In Hibernate forum.hibernate.orgHello. Currently I have a table with following schema: Code: +--------+------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+------------------------------------+------+-----+---------+-------+ | id ... |
6. order by custom function instead of table field forum.hibernate.org |
7. Ordering of selected fields in |
8. Informix order by fields not in select .. HQL forum.hibernate.orgI notice that hibernate doesn't add the fields in the SELECT that are in the ORDER BY. It produces a syntax error when the query is executed in INFORMIX (it works for databases as Mysql). Some have experimented the same problem? Would be a solution to change the informix dialect ? How can I do? Thanks in advance. |
9. invalid field in order by clause ? forum.hibernate.orgI've created a very basic hibernate query Session session = HibernateSessionFactory.getInstance().getCurrentSession(); Transaction tx = session.beginTransaction(); List results = session.createQuery("from Blog as bl where bl.link=?").setString(0, uri).list(); This is expected to return a list of Blog objects with contains a one-to-many mapping of BlogPost objects. The Blog table has no datetime fields, the BlogPost table has a single datetime field called publishedDate Statements ... |
10. How to order by a field in a one-to-many related entity forum.hibernate.orgHeres the basic setup: (pseudocode) |
11. How to do a 'substr' on a order field with criteria? forum.hibernate.org |
12. Hibernate *order of the fields of the class* forum.hibernate.org |