CDO and generated model Impl [message #600878] |
Mon, 08 January 2007 14:49 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02965 seconds