Uploaded image for project: 'Hibernate ORM'
  1. HHH-712

table-per-concrete-class mapping needs super-class table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 3.0.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Oracle 9i
      Hibernate 3.0.5, 3.0.3
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      I have table-per-concrete-class mapping as it described in reference.
      Hibernate look for super-class table, but it does not exist.
      If i have table "slot" with column slot_id all is fine.
      If i work with concrete classes all is fine too.
      Is it necessary to have super-class table for inheritance mapping?

      A part of SQL query:
      ... null as relationpattern_id, 0 as clazz_ from Slot union all select null as Measure_Id, ...

      Code between sessionFactory.openSession() and session.close():
      SESSION.get( Slot.class, new Integer( slot.getSlot_id() ) );

      Mapping documents:
      <class
      name="...Slot"
      lazy="false"
      >

      <id
      name="slot_id"
      column="slot_id"
      type="int"
      access="field"
      >
      <generator class="native">
      </generator>
      </id>
      ...
      <union-subclass
      name="...SlotConditionalRelation"
      table="Slot_Conditional_Relation"
      lazy="false"
      >

      ...
      </union-subclass>

      <union-subclass
      name="...SlotConditionalAttribute"
      table="Slot_Conditional_Attribute"
      lazy="false"
      >
      ...
      </union-subclass>

      ...

      </class>

      more info http://forum.hibernate.org/viewtopic.php?t=944677

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: