Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO and generated model Impl
CDO and generated model Impl [message #600878] Mon, 08 January 2007 14:49
Eclipse UserFriend
Originally posted by: yannick.lizzi.silogic.fr

Hi (again)

I have a question regarding the generated code for CDO model.

The multiple associations (aggregation or not) are generated as follow:

public EList getMyChildren() {
cdoLoad();
if (children == null) (
// init children
...
}
return children;
}

But in case of simple association, the generated code is as follow:

public Children getMyChildren() {
if (children != null && children.isProxy()) {
// resolving proxy
...
}
return children;
}

My question is: why the generated getter does not start with cdoLoad()
in the simple relation case?
This leads to problems (in my code at least): when I load my object
model via some container classes, I call getMyChildren() where I know
there is a children (confirmed also by the database content) and this
result to a null value.

Of course if I invoke cdoLoad() before each call of getMyChildren()
(either in my impl code or in the calling code) it works but I was
thinking of something more automatic if not direcly generated.

Yannick
Previous Topic:jet editor
Next Topic:Teneo: .ejdo usage in generated editor
Goto Forum:
  


Current Time: Sat Feb 27 23:11:33 GMT 2021

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

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

Back to the top