Uploaded image for project: 'OJB'
  1. OJB
  2. OJB-53

Ignored constraint checked

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 1.0.3, 1.1 CVS
    • 1.0.x CVS, 1.1 CVS
    • None
    • None
    • OJB 1.0.3
      Eclipse 3.0.2
      JBoss IDE 1.4.1

    Description

      I'm mapping each table to a single object. In inheritance, only the ID field is in both tables.

      Here is the object definition :


      MyDoc extend Doc
      Orga extend Party

      Party has a collection of Doc
      Doc has a reference to Party
      In Orga, I ignore the collection inherited
      In MyDoc, I ignore the reference to party and partyId

      Before this fixe, I've got the error :
      <<Cannot ignore field partyId in class MyDoc because it is used in class
      Doc as a foreignkey of the collection partyDocs from class Orga>>

      Now I have :
      <<Cannot ignore field partyId in class MyDoc because it is used in class
      Doc as a foreignkey of the collection partyDocs from class Party>>

      Desired repository :
      ---------

      <class-descriptor
      class="Doc"
      table="DCT_DOC"
      >
      <field-descriptor
      name="partyId"
      column="PartyId"
      jdbc-type="INTEGER"
      access="anonymous"
      >
      </field-descriptor>
      <field-descriptor
      name="documentId"
      column="documentId"
      jdbc-type="INTEGER"
      primarykey="true"
      nullable="false"
      autoincrement="true"
      access="readonly"
      >
      </field-descriptor>

      <reference-descriptor
      name="party"
      class-ref="Party"
      proxy="true"
      >
      <foreignkey field-ref="partyId"/>
      </reference-descriptor>
      </class-descriptor>

      <class-descriptor
      class="MyDoc"
      table="DCT_MYDOC"
      >
      <field-descriptor
      name="documentId"
      column="documentId"
      jdbc-type="INTEGER"
      primarykey="true"
      nullable="false"
      access="readwrite"
      >
      </field-descriptor>

      <reference-descriptor
      name="super"
      class-ref="Doc"
      auto-retrieve="true"
      auto-update="object"
      auto-delete="object"
      >
      <foreignkey field-ref="documentId"/>
      </reference-descriptor>
      </class-descriptor>

      <class-descriptor
      class="Party"
      table="PTY_PARTY"
      >
      <field-descriptor
      name="partyId"
      column="partyId"
      jdbc-type="INTEGER"
      primarykey="true"
      nullable="false"
      autoincrement="true"
      access="readonly"
      >
      </field-descriptor>

      <collection-descriptor
      name="partyDocuments"
      element-class-ref="Doc"
      proxy="true"
      >
      <inverse-foreignkey field-ref="partyId"/>
      </collection-descriptor>
      </class-descriptor>

      <class-descriptor
      class="Orga"
      table="PTY_ORGA"
      >
      <field-descriptor
      name="partyId"
      column="partyId"
      jdbc-type="INTEGER"
      primarykey="true"
      nullable="false"
      access="readwrite"
      >
      </field-descriptor>

      <reference-descriptor
      name="super"
      class-ref="Party"
      auto-retrieve="true"
      auto-update="object"
      auto-delete="object"
      >
      <foreignkey field-ref="partyId"/>
      </reference-descriptor>
      </class-descriptor>

      Attachments

        1. ModelConstraints.java
          42 kB
          Michael Lefevre

        Activity

          People

            tomdz Thomas Dudziak
            lefevre00 Michael Lefevre
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment