Hi,
I have an "Item" class, and this class has a collection "Tags".
Item
IList<string> Tags;
my DB looks like this:
Items
Id
Tags
ItemId
TagName
I am trying to get all Items which have the tags "x" and "y". How can I do this with NHibernate (preferably with criteria API)? Is it even possible?
Thanks.
EDIT: can I do it without mapping the Tag object? It doesn't have ti be 1 query. Something like
var q = query that will return all id's of objects that have tag x or tag y".
var res = query that will return all Items with Id in ( q.Execute())