I am a first time user of the new JPA 2.0 Criteria API and I \'m running into a problem when I need to cast a number field to String to compare it with a String parameter. Reason is that I want to sea
When I specify columns in my jpql/jpa 2.0 query, i.e. select p.id, p.lastName, p.firstName from Profile p where p.group = :group I get the following error: [Ljava.lang.Object; cannot be cast to com.pr
I have a table of Sessions. Each session has \"session_start_time\" and \"session_end_time\". While the session is open, the end time is empty. I want to fetch the list of sessions, and order it by th
My Application model object contains a date field (time stamp): @Entity @Table(name = \"M开发者_开发百科YTABLE\")
Hey guys,I have the following query and for the life of me I can\'t seem to translate it into JPQL.The working SQL is:
I have a rather big model Applicant: public class Applicant{ private Long id private String name; ... .开发者_如何学C..
I have the following situation: a class Event that has a collection of Participant objects, but the class Participant don\'t have any reference to event. So, I need to get the first 5 most recent part
If I have a class Apple that extends Fruit, how do I write a JPQL query to return all objects tha开发者_JAVA百科t are strictly Fruits and not Apples?This is possible in JPA 2.0 using the TYPE operator
I\'m working on a project which uses JPA for persistence, and I\'m trying to find the cleanest and most efficient means for testing JPQL queries.I am more accustomed to the Hibernate world... in which
I\'m trying to evaluate the following JPQL query: select err from Error err where err.errType = ? and err.msg in (?)