[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5432) Mapping gets confused if superclasses are in different packages.

Pierce Wetter (JIRA) noreply at atlassian.com
Mon Aug 2 19:08:42 EDT 2010


Mapping gets confused if superclasses are in different packages. 
-----------------------------------------------------------------

                 Key: HHH-5432
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5432
             Project: Hibernate Core
          Issue Type: Bug
    Affects Versions: 3.6.0.Beta1, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5.0-Final
            Reporter: Pierce Wetter


Let's say because you use a mixture of generated and customized code, so that most of your classes are split into a generated superclass in one package, and a subclass that's where you put custom code. If you put the generated code in a different package, Hibernate will have issues with the mapping, such that it will miss the superclasses. This becomes obvious if you generate the metamodel, because it will omit "extends superclass" from the model. 

i.e.:

  com.example.jpa.generated   
  com.example.jpa.custom 

public class com.example.jpa.custom.RootClass.java

public class com.example.jpa.generated.FirstClassGen.java extends RootClass

public class com.example.jpa.custom.FirstClass.java extends FirstClassGen

public class com.example.jpa.generated.SecondClassGen.java extends FirstClass

public class com.example.jpa.custom.SecondClass.java extends SecondGlassGen


This causes Hibernate to get confused. However, if everything is in the same package, things are ok, the superclasses are correctly mapped. 






-- 
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