criteria « Key « JPA Q&A





1. JPA: Invalid-Key Error when using the Criteria API    stackoverflow.com

I always get the same error when using the criteria API:

    Local Exception Stack:
Exception [EclipseLink-6075] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.QueryException
Exception Description: Object comparisons can only use the ...

2. Criteria, Example.create () and foreign keys...    forum.hibernate.org

Maybe I'm using it wrong, but it seems that Example.create () only works for simple properties (Long/String/etc) and doesn't take into account foreign key relationships. My use case: Address a = new Address () ; a.setCity ("somecity") ; a.setState (new State ("AL")) ; ... = Example.create (a) ; The State entity is never included in the generated SQL... I can implement ...

3. [CRITERIA] Join without foreign key    forum.hibernate.org