Hi, we have an implementation using the Data module where we store data in custom types. Some of those data types are mapped. I am currently trying to implement a search on those but don't get anywhere using JCR xpath queries (or SQL for that matter). We have a few types: Products, Offers and Categories. The Product type has a mapping to offers which is implemented with the DialogMultiSelect control in the data module dialog of the Product type. Now I can see the mapping in the JCR browser, the product having the child nodes of offers/0/offer1 and Offers/1/Offer2 what I need to retrieve is all the products that have a certain offer as a member. Obviously that would be quite straightforward if it was a normal property but the child nodes are stored as mgnl:contentNode and I can't seem to query on that at all. Hopefully I am just missing something but so far no luck.
When retrieving a product and I know the Product name with magnoliaCriteria it gives me the path names for the child nodes but in a JCR query nothing is returned. The tree basically looks like this: /product /product/Product1 /product/Product1/title=Product 1 ..... /product/Product1/offers/jcr:uuid=04e73db2-6368-49d8-952b-4c09a06f8ef0 /product/Product1/offers/jcr:mixinTypes=mix:lockable /product/Product1/offers/1=/offer/Offer1 /product/Product1/offers/0=/offer/Offer2 /product/Product1/offers/jcr:created=2011-06-20T10:23:19.628+01:00 /product/Product1/offers/jcr:primaryType=mgnl:contentNode /product/Product1/offers/MetaData /product/Product1/offers/MetaData/jcr:uuid=6ede8411-ee71-4997-8748-a838f3e5da2d /product/Product1/offers/MetaData/mgnl:creationdate=2011-06-20T10:23:19.628+01:00 /product/Product1/offers/MetaData/jcr:created=2011-06-20T10:23:19.628+01:00 /product/Product1/offers/MetaData/jcr:primaryType=mgnl:metaData Do I have to resign to retrieving all products and then filtering the result by offer or type just because Magnolia stores the nodes that way? Surely not, JCR (with or without help from criteria) should be able to filter the result in the query. Thanks for the help, Howie -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=4a842171-15ed-4ce7-8a8b-43c4fc37bfe3 ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
