For the sake of simplicity, I refer to the class model from the tutorial
"Advanced Object Relational Mapping techniques" to explain my problem. It
seems to be quite simple but I wasn't able to figure it out correctly.
All I want to do is to get all ProductGroup's which have an Article with the
articleName "Article 1" _and_ an Article with the articleName "Article 2" in
its allArticlesInGroup Vector.
Using the PersistenceBroker API I wrote the following:

Criteria crit = new Criteria();
crit.addEqualTo("allArticlesInGroup.articleName", "Article 1");
crit.addEqualTo("allArticlesInGroup.articleName", "Article 2");
Query q = QueryFactory.newQuery(ProductGroup.class, crit);

Unfortunately this approach does not work and I always get an empty result
collection. Using only one addEqualTo statement works as expected but using
two of them won't.
Anyone has an idea how to do this? Any help is appreciated!

Thanks in advanced,
 Gregor


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to