Hi everyone,
I am useing OCM to store things in Jackrabbit.
I have a problem building my filter:
My Class is called JCR Content and looks something like this:
@Node
public class JCRContent implements Serializable {
/**
* Reference to the unique ContentId
*/
@Field(uuid=true)
private String uuid;
/**
* Reference to the Kategories/MenuIds of a Content object
*/
@Collection(elementClassName = MenuId.class)
private List<MenuId> menuIds;
/**
* Path of the Content Entry in Jackrabbit
*/
@Field(path=true)
private String path;
}
Now my problems is that I only want objects with a certain menuId returned.
I tried this but it wont work :
ObjectContentManager ocm = ocmFactory.createObjectContentManager();
org.apache.jackrabbit.ocm.query.QueryManager queryManager =
ocm.getQueryManager();
Filter filter = queryManager.createFilter(JCRContent.class);
filter.addEqualTo("menuid", "1067");
Can anyone please give me ahint on how I would do this query?
Thx a lot in advance!