Torque
  1. Torque
  2. TORQUE-248

Filler methods fail for nulled composite foreign keys

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-beta1
    • Fix Version/s: 4.0
    • Component/s: Templates
    • Labels:
      None

      Description

      Situation: A composite foreign key is nullable, i.e all colums of which the foreign key consists can be set to null.
      All columns set no null means that the object does not reference a foreign object.
      Observed behavior: The filler method in the peer of the referencing object fails with an exception, e.g:
      org.apache.torque.NoRowsException: No result found for key N:S: in table COMP_INTEGER_VARCHAR_PK
      at org.apache.torque.test.peer.base.BaseCompIntegerVarcharFkPeerImpl.fillCompIntegerVarcharPks(BaseCompIntegerVarcharFkPeerImpl.java:1009)
      at org.apache.torque.test.peer.base.BaseCompIntegerVarcharFkPeerImpl.fillCompIntegerVarcharPks(BaseCompIntegerVarcharFkPeerImpl.java:898)
      at org.apache.torque.test.peer.base.BaseCompIntegerVarcharFkPeerImpl.fillCompIntegerVarcharPks(BaseCompIntegerVarcharFkPeerImpl.java:867)
      at org.apache.torque.test.peer.base.BaseCompIntegerVarcharFkPeer.fillCompIntegerVarcharPks(BaseCompIntegerVarcharFkPeer.java:1126)
      at org.apache.torque.generated.peer.FillerTest.testFillReferencedCompositeKey(FillerTest.java:404)
      ...

      Expected behavior: The filler method should check for "all keys null" and do not try to create a link in this case.

        Activity

        Thomas Fox created issue -
        Thomas Fox made changes -
        Field Original Value New Value
        Assignee Thomas Fox [ tfischer ]
        Thomas Fox made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Thomas Fox made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Thomas Fox made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Thomas Fox
            Reporter:
            Thomas Fox
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development