JPQL « Map « JPA Q&A





1. Execute "MEMBER OF" query against 'ElementCollection' Map fields in JP-QL (JPA 2.0)    stackoverflow.com

Is it possible to run a "MEMBER OF" query against associative arrays? If so, what does the syntax look like? The obvious workaround is a native query but that ...

2. JPA 2.0: TYPE expression exception    stackoverflow.com

I have a inheritance structure with to classes, let's say Parent (as the root class) and Child as the subclass. So with JPA 2.0 no I can select only the Parent class ...

3. JPQL ManyToMany Query Issue    stackoverflow.com

My Entity mapping is as follows:

public class EntertainmentContentBean implements Serializable, Cloneable {
.
.
.
@ManyToMany
    @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
    @JoinTable(schema = "etmt", name = "content_operator", joinColumns = @JoinColumn(name = ...

4. JPQL: Problem with the following WHERE-Clause using Inheritance    stackoverflow.com

I'm using the following query, for getting all Fruits that are linked with the User.

return (List<Fruit>) getEm()
            .createQuery(
   ...

5. Hibernate JPQL - querying for KEY() in Map association error    stackoverflow.com

I'm trying to make a JPQL query that should fetch an entity and the keys from one of its map associations, and I'm getting a bizzare error. My setup is JPA2 using ...

6. JPA persists already persisted Objects from a ManyToMany relationship    stackoverflow.com

I have a @ManyToMany relationship between class A and class B : class A references a collection of class B instances, and this relationship is configured as CascadeType.ALL. So when a ...

7. JPA: DELETE WHERE does not delete children and throws an exception    stackoverflow.com

I am trying to delete a large number of rows from MOTHER thanks to a JPQL query. The Mother class is defined as follows:

@Entity
@Table(name = "MOTHER")
public class Mother implements Serializable {

  ...

9. JPQL with inheritance - N+1 Select    forum.hibernate.org

I have this inheriance tree Code: public class Entry { ... private Long id; private String field1; ...getters and setters... } public class InEntry extends Entry { ... private List outEntries; ...getters and setters... } public class OutEntry extends Entry ...





10. JPA2 : Pb with JPQL Map and VALUE() and KEY()    forum.hibernate.org

Hi, I have some problems when I use keyword VALUE() and KEY() in JPQL. When EntityManager generate SQL, it seems to do not transform keyword VALUE() and KEY(). I obtain exception : java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode \-[METHOD_CALL] MethodNode: '(' +-[METHOD_NAME] IdentNode: 'VALUE' {originalText=VALUE} \-[EXPR_LIST] SqlNode: 'exprList' \-[ALIAS_REF] IdentNode: 'elt2_.id' {alias=l, className=test.jpa2.entity.Elt, tableAlias=elt2_} at org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:154) at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:844) at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:632) ...

11. JPQL - Limiting Joined Inheritance Tables    forum.hibernate.org

Newbie Joined: Wed Nov 21, 2007 10:24 am Posts: 12 I've got a lot of tables that are subclasses of a type with @Inheritance(strategy = InheritanceType.JOINED), but the problem is when I try to do a JPQL query to just one type using a query like Code: select value from value join value." + valueName + " dbValue " + " ...

12. JPQL and inheritance    forum.hibernate.org