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

Scotchy (JIRA) noreply at atlassian.com
Tue Nov 30 08:14:13 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39231#action_39231 ] 

Scotchy commented on HHH-5202:
------------------------------

I'm running into the exact same issue. It does not prevent the application from working, but this leads to inheritance being unusable on a large scale project when you only need the root entity information.

Any updates on this ?

> 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