Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-3

One way to-many support

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.2 branch
    • Undefined future
    • Core Library
    • None

    Description

      This is somewhere between a bu and a new feature. Normally Cayenne allows uni-directional mapping of ObjRelationships, as long as underlying DbRelationships
      are bi-directional.

      Problem:

      Uni-directional to-many do not work. Symptom of this is saving a FK column value of the "to-many" side object as NULL, when it was added to the parent object via "parent.addToXyzArray(child)".

      This was originally reported by Scott Merritt. His example is attached to the bug report.

      [LATER COMMENT BY ARNDT]

      we just stumbled over this same problem, went all the way through debugging it and finally found the unit-test that is supposed
      to test this.

      OneWayOneToManyTst.testReadList()

      However, the assertion assertNotNull(a2) is really misleading - it suggests that this is a successfull test, but the result in fact is totallay wrong! (empty list instead of
      2 entries)

      so I have difficulties qualifiyng this as a "missing feature", and I would like to see at least to have this constraint added
      to the datamap-validation to see a warning
      about this.

      Or , of course, even better - make it work

      regards,

      Arndt

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: