openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laird Nelson (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OPENJPA-2065) JPA 2.0 Spec. Violation? EntityManager#createNamedQuery(String, Class) bombs with non-entity Class parameter
Date Tue, 25 Oct 2011 18:02:32 GMT
JPA 2.0 Spec. Violation? EntityManager#createNamedQuery(String, Class) bombs with non-entity
Class parameter
------------------------------------------------------------------------------------------------------------

                 Key: OPENJPA-2065
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2065
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
    Affects Versions: 2.1.0
            Reporter: Laird Nelson


Suppose we have an interface, A.

Suppose we have an entity, B, that implements A.

This construction will fail at runtime:

{code}
final TypedQuery<A> q = em.createNamedQuery("someNamedQuery", A.class);
{code}

I don't see anywhere in the JPA specification that the class parameter must denote an entity
type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message