[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5202) polymorphism=PolymorphismType.EXPLICIT not work

zhuzhangsuo (JIRA) noreply at atlassian.com
Fri May 7 02:46:48 EDT 2010


polymorphism=PolymorphismType.EXPLICIT  not work
------------------------------------------------

                 Key: HHH-5202
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5202
             Project: Hibernate Core
          Issue Type: Bug
          Components: annotations
    Affects Versions: 3.5.1
         Environment: hibernate3.5.1   mysql 5.1
            Reporter: zhuzhangsuo
         Attachments: src.rar

class Book ,Section is Inheritanced from EntityItem and use @Inheritance(strategy=InheritanceType.JOINED) 
I want to use @org.hibernate.annotations.Entity(dynamicUpdate=true,selectBeforeUpdate=true,  polymorphism=PolymorphismType.EXPLICIT)  to select the base table into EntityItem but not Book or Section 

The sql is : select entityitem0_.entity_id as entity1_0_, entityitem0_.entity_author as entity2_0_, entityitem0_.entity_category as entity3_0_, entityitem0_.entity_ctime as entity4_0_, entityitem0_.entity_desc as entity5_0_, entityitem0_.entity_folder as entity6_0_, entityitem0_.entity_keyword as entity7_0_, entityitem0_.entity_name as entity8_0_, entityitem0_.entity_operator as entity9_0_, entityitem0_.entity_order as entity10_0_, entityitem0_.entity_pid as entity18_0_, entityitem0_.entity_picture as entity11_0_, entityitem0_.entity_status as entity12_0_, entityitem0_.entity_tag as entity13_0_, entityitem0_.entity_template as entity14_0_, entityitem0_.entity_type as entity15_0_, entityitem0_.entity_update_time as entity16_0_, entityitem0_.entity_url as entity17_0_, entityitem0_1_.section_content as section1_1_, entityitem0_2_.book_continue as book1_2_, entityitem0_2_.book_copyright as book2_2_, entityitem0_2_.book_grade as book3_2_, entityitem0_2_.book_press as book4_2_, entityitem0_2_.book_price as book5_2_, entityitem0_2_.book_pv as book6_2_, entityitem0_2_.book_translate as book7_2_, case when entityitem0_1_.entity_id is not null then 1 when entityitem0_2_.entity_id is not null then 2 when entityitem0_.entity_id is not null then 0 end as clazz_ from book_entity entityitem0_ left outer join book_section_detail entityitem0_1_ on entityitem0_.entity_id=entityitem0_1_.entity_id left outer join book_detail entityitem0_2_ on entityitem0_.entity_id=entityitem0_2_.entity_id

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