openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Commented: (OPENJPA-187) MEMBER OF query fails on OpenJPA, but works fine with TopLink and Hibernate EM
Date Wed, 30 Jul 2008 22:05:31 GMT


Pinaki Poddar commented on OPENJPA-187:

This commit extends the ability to accept an unmanaged or transient instance as query  parameter.
This was available for managed entities only.
This addition is limited to parameter entities with their primary key fields populated and
subjected to peer review.
This feature may also open up a discussion on how to support query-by-example pattern.

I learned
a) 'Osoba' means 'Person' in Polish. 'Osoby' is plural
b) 'Project' is spelled 'Projekt' in Polish. It splural form is 'Projekty'


> MEMBER OF query fails on OpenJPA, but works fine with TopLink and Hibernate EM
> ------------------------------------------------------------------------------
>                 Key: OPENJPA-187
>                 URL:
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: query
>    Affects Versions: 0.9.7
>            Reporter: Jacek Laskowski
>            Assignee: Pinaki Poddar
> What's wrong with the following query?
>   Query query = em.createQuery("SELECT DISTINCT o FROM Osoba o WHERE :projekt MEMBER
OF o.projekty");
>   query.setParameter("projekt", new Projekt("Apache OpenEJB", RodzajProjektu.OTWARTY));
>   List<Osoba> osoby = query.getResultList();
>   assert osoby.size() == 1 : "Otrzymano " + osoby.size();
> where Projekt is an entity where @Id is of type String (the first input parameter in
the two-param constructor above).
> TopLink 2.0 BUILD 40 and Hibernate EntityManager 3.3.0.GA work fine whereas OpenJPA 0.9.7-SNAPSHOT
finishes with the java.lang.AssertionError error (it's the test itself actually, but since
the query returns 0 elements the issue originates in OpenJPA).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message