I have a followup issue: Suppose I want all products with all of the tags specified instead og all of the products with at least one of the tags (which is what the query above does). I've tried to do multiple joins on p.Tags, assigning each join a different alias like this:
select distinct p from Product p join p.Tags t0 where t0.TagID = 1 join p.Tags t1 where t1.TagID = 2 But of course that doesn't work. In SQL, I would use multiple subqueries or maybe some sort of intersect. Am I making sense? I suppose I could run multiple queries, one for each TagID, returning a list of productIDs, then do some logic to intersect the lists, but that feels kind of inefficient. Any ideas out there? Todd --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
