Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      win7 xamp mysql

      Description

      GenericPositionPair XML:
      <mapped-superclass name="GenericPositionPair">
      <indexes>
      <index columns="position" />
      </indexes>
      <field name="position" type="integer" column="position" />
      </mapped-superclass>

      GenericPrimaryPositionPair XML:
      <mapped-superclass name="GenericPrimaryPositionPair">
      <indexes>
      <index columns="isPrimary" />
      </indexes>
      <field name="isPrimary" type="boolean" column="isPrimary" />
      </mapped-superclass>

      PrimaryPositionPair XML:
      <entity name="PrimaryPositionPair" table="PrimaryPositionPair">
      <id name="first" type="integer" column="first_id" association-key="true" />
      <id name="second" type="integer" column="second_id" association-key="true" />
      <many-to-one field="first" target-entity="First">
      <join-column name="first_id" referenced-column-name="id" />
      </many-to-one>
      <many-to-one field="second" target-entity="Second">
      <join-column name="second_id" referenced-column-name="id" />
      </many-to-one>
      </entity>

      PHP:
      PrimaryPositionPair exteds GenericPrimaryPositionPair
      GenericPrimaryPositionPair extends GenericPositionPair

      Finally - the resulting SQL statement contains no idexes on position and isPrimary fields.

      Suggestion - wouldn't it be easier to just include attribute index="true" instead od <indexes> tag, since attribute unique="true" already works.

        Issue Links

          Activity

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Lazar Otasevic
            • Votes:
              3 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: