This is somewhere between a bu and a new feature. Normally Cayenne allows uni-directional mapping of ObjRelationships, as long as underlying DbRelationships
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.
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
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
Or , of course, even better - make it work