On Mon, Nov 10, 2008 at 12:35, Ераскин Алексей <[EMAIL PROTECTED]> wrote:

In result, collection isn't empty because OCM saves to repository to the
> "text" property(annotated field in Parent class) following value: "this is
> child" Why?
>

Because the Child class "extends" the Parent Class (see
@Node(extend=Parent.class) ) in term of OCM mapping and not in term of java.


 "@Node(extend=Parent.class)"  is a way to get all mapping info from an
ancestor class. this is only used  for an inheritance tree which is not your
case I think.

You can solve the problem by replacing "@Node(extend=Parent.class)" by @Node
and add mapping info in the Child class.

FYI, "extend" attribute in @Node is obsolete. I will add a tutorial on the
inheritance support. From now, with the latest build from subversion, it is
possible to write :

@Node
Class MyAncestor
{
     // Add  fields here
}

@Node
Class MyClass extends MyAncestor
{
   // Add  fields here
}

MyClass will inherit all mapping info made in the MyAncestor because it is a
descendant of MyAncestor.


 Let me know if you need more info

br,
Christophe

Reply via email to