[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4066) JPA compatibility problem

Albert Kurucz (JIRA) noreply at atlassian.com
Fri Jul 31 10:37:13 EDT 2009


JPA compatibility problem
-------------------------

                 Key: HHH-4066
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4066
             Project: Hibernate Core
          Issue Type: Bug
    Affects Versions: 3.3.2
         Environment: Hibernate Core 3.3.2, problem is independent from database type (actually appeared with Derby 10.4.2)
            Reporter: Albert Kurucz


POJO Entity with 100% JPA annotations, as long as the Class did not implement the Map interface everything worked fine (save to and load from database).
After the Class implemented the Map interface, during object persistence,  'get' was called with '$type$' parameter, and 'get' responded with IllegalArgumentException (in accordance to its design).

Workaround implemented: get now responds to this call by returning getClass().getName()

BUT Hibernate should not need this workaround if it is 100% JPA compliant.

On the above example the Map interface of the Entity Class had no connection with persisted variables, only transients.

In the JPA spec there is no restriction what I know of, which would disallow the implementation of Map by an Entity Class.
In the JPA spec there is no requirement what I know of, which would require and Entity Class which implement the Map interface to implement the Map interface in any special way (like 'get' responding to '$type$').
Correct me if I am wrong.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list