That's correct, you can see an example in the unit tests :
see the classes :

org.apache.jackrabbit.ocm.testmodel.SimpleAnnotedAbstractClass
org.apache.jackrabbit.ocm.testmodel.SimpleAnnotedClass

and the unit test : AnnotationSimpleTest

Maybe there is a bug in another area. Can you give us the full stacktrace ?
Maybe the problem comes from the fact that you are using the path & uuid in
the same test. I'm not sure if this case is well tested. If not, we will fix
it.

Christophe

2009/6/25 Nicolas Brasseur <[email protected]>

>
> Hi,
>
> I try to persist a basic inheritance structure using ocm but it keeps
> telling me that my object does not have a 'path=true' property.
>
>
> Repository access exception; nested exception is
> org.apache.jackrabbit.ocm.exception.JcrMappingException: Class of type:
> model.CourseDocument has no path mapping. Maybe attribute path="true" for a
> field element of this class in mapping descriptor is missing  or maybe it is
> defined in an ancestor class which has no mapping descriptor.
> Here are the source:
>
> @Node
> public class CourseDocument extends OcmEntity{
>    protected @Field String title;
>    protected @Field Date pubDate;
>    protected @Field String description;
>    ... + public getters & setters
> }
>
> ------
>
> @Node(jcrMixinTypes = "mix:referenceable")
> public class OcmEntity {
>
>    protected @Field(path=true) String path;
>    protected @Field(uuid=true) String uuid;
>       ... public getters & setters
>
> }
>
> I've read (i don't remember where) that the extend attribute (in the Node
> annotation) was deprecated and that the java inheritance relationship will
> be enough.
>
> any idea on what's wrong in my code.
>
> thanks in advance
>
> N.
>
>
>
>
>

Reply via email to