[jboss-jira] [JBoss JIRA] Created: (JBPM-759) Hibernate variable type matchers do not deal HibernateProxy objects.

Travis Klotz (JIRA) jira-events at jboss.com
Thu Sep 28 15:53:42 EDT 2006


Hibernate variable type matchers do not deal HibernateProxy objects.
--------------------------------------------------------------------

                 Key: JBPM-759
                 URL: http://jira.jboss.com/jira/browse/JBPM-759
             Project: JBoss jBPM
          Issue Type: Bug
          Components: Core Engine
    Affects Versions:  jBPM 3.1.2
            Reporter: Travis Klotz
         Assigned To: Tom Baeyens


The hibernate type matchers(HibernateLongIdMatcher, HibernateStringIdMatcher) do not match against persistant objects that are wrapped in hibernate generated proxies.  

For example, if I have a User class registered with hibernate, and I try to store a lazily instantiated User object as a context variable in jBPM, The class of the User instance is not User,  its something like  User$$EnhancedByCGLIB$$12345.  When the hibernate type matchers try to match against this class,  they do so by checking the hibernate session factory for any metadata about the argument.  But the session factory does not know anything about User$$EnhancedByCGLIB$$12345, only User, which results in a no match.

I solved this localy by extending the type matchers and explicitly checking the argument for the HibernateProxy interface.  If I found it, I ran the rest of the checks against the super class of the argument.

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

        



More information about the jboss-jira mailing list