Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [teneo] bidirectional OneToOne containment association - container not set in child object
[teneo] bidirectional OneToOne containment association - container not set in child object [message #602125] Sat, 03 February 2007 18:46
Andre Pareis is currently offline Andre PareisFriend
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
Previous Topic:emf model importer: prefix names are always "type"
Next Topic:[Teneo] Setting a 'unique' constraint on a many-to-one reference in hibernate
Goto Forum:
  


Current Time: Sat Apr 20 00:20:21 GMT 2024

Powered by FUDForum. Page generated in 0.03261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top