jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: Working with JackRabbit OCM
Date Mon, 10 Nov 2008 12:38:49 GMT
On Mon, Nov 10, 2008 at 12:35, Ераскин Алексей <eraa@1c.ru> 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 :

Class MyAncestor
     // Add  fields here

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message