projection « Field « JPA Q&A





1. Hibernate criteria query using Max() projection on key field and group by foreign primary key    stackoverflow.com

I'm having difficulty representing this query (which works on the database directly) as a criteria query in Hibernate (version 3.2.5):

SELECT s.* 
  FROM ftp_status s 
 WHERE (s.datetime,s.connectionid) IN (SELECT ...

2. Hibernate doesn't support accessing fields on usertypes for projection criterias?    stackoverflow.com

My Classes:

public class User 
{
   @Type(type="AccountType")
   private AccountType accountType;
}

public class AccountType 
{
   private String name;

   private AccountType(String name)
   {
   ...

3. Hibernate error from Projections.sum when sum too large for field's type    stackoverflow.com

I am trying to use a Projection to sum up a size field when grouped by a role. The Criteria is working fine except for when the sum no longer fits ...

4. Error in Projections.sum when sum too large for field's type    forum.hibernate.org

I am trying to use a Projection to sum up a size field when grouped by a role. The Criteria is working fine except for when the sum no longer fits into the type of the size field. The database I am using MySQL returned a larger type for the sum when I ran the generated query directly against the database ...

5. Criteria Projection and Many-to-Many field    forum.hibernate.org

Hi, I am relatively new to Hibernate, so this could be a really daft question showing fundamental ignorance! I have read through the documentation and the posts here, and can not see a problem with what I am doing - clearly there is though! I am using the Criteria API to fetch some records from my database, Projections to restrict which ...