openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENJPA-2004) v2.1.0 Type Function Bug
Date Fri, 27 May 2011 15:01:48 GMT

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

Rick Curtis updated OPENJPA-2004:
---------------------------------

    Attachment: OPENJPA-2004.ut.patch

Attaching an OpenJPA unit test. I also confirmed that this is a regression from 2.0.x ->
2.2.x ( I didn't test this on 2.1).

> v2.1.0 Type Function Bug
> ------------------------
>
>                 Key: OPENJPA-2004
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2004
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 2.1.0
>         Environment: Linux and OS X.
>            Reporter: Brian Gebala
>            Priority: Minor
>             Fix For: 2.1.1
>
>         Attachments: OPENJPA-2004.ut.patch, type-function-bug-test.tar.gz
>
>
> I just updated to v2.1.0 from v2.0.1 and noticed that a query using TYPE()
> <> X is no longer working. I have an abstract base class and two
> subclasses. My query asks for all but one of the subclasses, like this:
> SELECT d FROM AbstractClass d WHERE d._state = :state AND TYPE(d) <>
> SubClassTwo
> When I run this query with v2.1.0, the SQL is generated as if the query
> said
> "TYPE(d) = SubClassTwo", resulting in a match on
> the SubClassTwo discriminator. I found a work-around using NOT IN:
> SELECT d FROM AbstractClass d WHERE d._state = :state AND TYPE(d) NOT IN
> (SubClassTwo)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message