jpql « Eclipse « JPA Q&A





1. Parameter in like clause JPQL    stackoverflow.com

I am trying to write a JPQL query with a like clause: ...LIKE '%:code%' I would like to have code=4 and find 455 554 646 ... I cannot pass :code = '%value%' namedQuery.setParameter("%" + this.value + "%"); because in another ...

2. Workaround for the missing NVL() in JPA 1.0    stackoverflow.com

is there a workaround for the missing NVL() function in JPA 1.0 (Eclipselink 1.1.x)? Thank you and best regards

3. JPQL inconsitency between hibernate and eclipselink    stackoverflow.com

I have the following query that works under Hibernate but not under eclipse:

select o from Organisation o where o.code=:code and o.type=:type
It is not clear to me why this is the case, ...

4. JPA 2 "member of" syntax doesn't work with members of superclass    stackoverflow.com

Basically i have a named query "findServerWithNic" which refuses to work:

@Entity
@Table(name = "vnm_server")
@DiscriminatorValue("S")
@NamedQueries({
    @NamedQuery(
        name="findServerWithNic",
       ...

5. JPA: PersistenceException "unknown state or association field"    stackoverflow.com

I am trying to understand how to do (simple) joins in JPQL. I have two tables/entities: Parent and Child.

@Entity
@Table(name = "Parent")
@NamedQueries({
    @NamedQuery(name = "Parent.findByStatus", query = "SELECT ...