jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Brasseur <nicolasbrass...@yahoo.com>
Subject OCM and inheritance
Date Thu, 25 Jun 2009 16:25:00 GMT


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:

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



View raw message