[teneo] bidirectional OneToOne containment association - container not set in child object [message #602125] |
Sat, 03 February 2007 18:46 |
Andre Pareis Messages: 113 Registered: July 2009 |
Senior Member |
|
|
Hi alltogether,
on CVS head version of teneo and previous versions:
I can successfully save and load a containment hierarchy with a one-to-one
association between a container and a child, and this hierarchy is displayed
correctly in the editor tree. However, if I invoke a method on the child which
navigates to the container, either via the named association or the eContainer()
I found that the container reference is null. Only the container has a reference
set to the child, but not vice-versa.
I tried to play around with the code here in HibernatePersistableEList:
// disabled for now as containers are persisted by hibernate anyway
if (false && isContainment()) {
final int featureID = getEStructuralFeature().getFeatureID();
for (int i = 0; i < objs.length; i++) {
if (objs[i] instanceof InternalEObject) {
EContainerRepairControl.setContainer(owner, (InternalEObject) objs[i],
getEStructuralFeature());
}
}
}
I've set the constant to "true" but it did not have any positive effect.
Any help? How or when do you expect hibernate to set both side of the association?
Thanks
Andre
|
|
|
Powered by
FUDForum. Page generated in 0.03261 seconds