openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-508) JPQL EXISTS clauses do not handle subclasses properly
Date Sat, 02 Feb 2008 06:45:08 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Patrick Linskey resolved OPENJPA-508.
-------------------------------------

    Resolution: Fixed

Resolved for subqueries in general.

> JPQL EXISTS clauses do not handle subclasses properly
> -----------------------------------------------------
>
>                 Key: OPENJPA-508
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-508
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 1.0.1
>            Reporter: Patrick Linskey
>             Fix For: 1.0.2, 1.1.0
>
>
> The following code does not properly add subclass indicators to the generated SQL query:
>         StringRootEntity e = new StringRootEntity();
>         e.setName("foo");
>         em.persist(e);
>         e = new StringRootEntity();
>         e.setName("foo");
>         em.persist(e);
>         e = new StringRootEntity();
>         e.setName("bar");
>         em.persist(e);
>         em.flush();
>         Query q = em.createQuery("select o from StringAbstractEntity o " +
>             "where exists (select o2 from StringLeafEntity o2)");
>         List<StringAbstractEntity> list = q.getResultList();
>         assertEquals(0, list.size());
> The assertion at the end fails; 3 results are returned, even though there are no SingleLeafEntity
instances in the store.

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


Mime
View raw message