jpql
Using JPA 2.0 Criteria API and cast causes generated JPQL to fail in Hibernate
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[详细]
2023-01-26 14:24 分类:问答Specifying columns in jpql select causes casting error
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[详细]
2023-01-26 06:59 分类:问答Ordering by varying columns in JPQL/Hibernate
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[详细]
2023-01-25 18:34 分类:问答JPQL and date comparison (constraint in the query)
My Application model object contains a date field (time stamp): @Entity @Table(name = \"M开发者_开发百科YTABLE\")[详细]
2023-01-23 21:32 分类:问答Trouble converting SQL Query into JPQL (Eclipselink)
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:[详细]
2023-01-22 21:08 分类:问答JPA Typed Search Queries
I have a rather big model Applicant: public class Applicant{ private Long id private String name; ... .开发者_如何学C..[详细]
2023-01-22 04:42 分类:问答JPQL maxResults on collection objs
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[详细]
2023-01-21 10:43 分类:问答JPQL exclude subclasses in a query
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[详细]
2023-01-21 04:49 分类:问答Any tools for testing ad hoc JPQL queries outside of an application?
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[详细]
2023-01-21 00:53 分类:问答Positional Parameter with IN clause in JPA
I\'m trying to evaluate the following JPQL query: select err from Error err where err.errType = ? and err.msg in (?)[详细]
2023-01-20 11:27 分类:问答