I believe that your only choice will be to use XPATH. The filter would be for properties but your menuIds are being stored as nodes.
On Mon, Jan 26, 2009 at 4:30 AM, Kurz Wolfgang <[email protected]>wrote: > 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! > > > -- Todd Seiber 830 Fishing Creek Rd. New Cumberland, PA 17070 h. 717-938-5778 c. 717-497-1742 e. [email protected]
