Title:
Bug 84520:(Watson Migration Closure)In fairly complex application I tried to mixing table per subclass and table per class hierarchy inheritance
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): daniel schmid / daniel schmid (daniel schmid)
Created: 10/04/2010
Components: ORM Support
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,1,274733 /
Priority/Frequency: Major / Unknown
Locale/System: English / Platforms All
Vote Count: 4
Problem:
In fairly complex application I tried to mixing table per subclass and table per class hierarchy inheritance. Schema:product //base entity ---tour //table per class hierarchy with products ---- cruise //single table hierarchy to tour the code: component display="product" persistent="true"{ property name="item_id" type="uuid" ormtype="string" fieldtype="id" generator="uuid" hint="key of the product"; } component display="tour" extends="product" persistent="true" joincolumn="item_id" discriminatorcolumn="tourtype"{ } component display="cruise" extends="tour" table="tour" discriminatorValue="cruise" persistent="true"{ property name="vessel" type="string"; } This Schme won't create with the error . "No discriminator found for cruise. Discriminator is needed when 'single-table-per-hierarchy' is used and a class has subclasses". Obviously, there is a discriminatorValue="cruise" in component cruise.Mixing inheritance strategies should be possible accroding to the hibernate documentation.http://docs.jboss.org/hibernate/core/3.3/reference/en/html/inheritance.html#inheritance-mixing-tableperclass-tablepersubclass
Method:
component display="product" persistent="true"{ property name="item_id" type="uuid" ormtype="string" fieldtype="id" generator="uuid" hint="key of the product"; } component display="tour" extends="product" persistent="true" joincolumn="item_id" discriminatorcolumn="tourtype"{ } component display="cruise" extends="tour" table="tour" discriminatorValue="cruise" persistent="true"{ property name="vessel" type="string"; }
Result:
No discriminator found for {enity]. Discriminator is needed when 'single-table-per-hierarchy' is used and a class has subclasses
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3042349
External Customer Info:
External Company:
External Customer Name: daniel schmid
External Customer Email: 2DFE192A446EDD6D99201549
External Test Config: 10/04/2010
Attachments:
Comments: