From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-26 22:23:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-314?pa= ge=3Dall ] =20 Emmanuel Bernard resolved ANN-314: ---------------------------------- Resolution: Rejected you misunderstood polymorphism. polymorphism explicit only applies on root entities and prevent queries nam= ing a (unmapped) superclass to return mapped sub entities if your case if ObjectA were not mapped and ObjectB were having polymorphis= m explicit, then from ObjectA would not return ObjectB elements > Problem with PolymorphismType.EXPLICIT > -------------------------------------- > > Key: ANN-314 > URL: http://opensource.atlassian.com/projects/hibernate/browse/A= NN-314 > Project: Hibernate Annotations > Type: Bug > Versions: 3.1beta7 > Reporter: =C3=81lvaro Queiroz Valente > > > @Entity(access =3D AccessType.FIELD) > @org.hibernate.annotations.Entity(polymorphism =3D PolymorphismType.EXPLI= CIT) > @Table(name =3D "TableA") > @Inheritance(strategy =3D InheritanceType.TABLE_PER_CLASS) > public class ObjectA{ > @Entity(access =3D AccessType.FIELD) > @Table(name =3D "TableB") > public class ObjectB extends ObjectA{=20 > When we call ObjectA ("findByKey") the Hibernate always use select union = with TableB, but the expect is select only TableA , because we use polymorp= hism =3D PolymorphismType.EXPLICIT. --=20 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 |