My bad. I didn't look well and thought Notes was an entity collection. I'm not really sure how to do it with Criteria then. With HQL, I believe you can do it with the "in" operator using the collection's elements as an argument.
Diego On Mon, Feb 22, 2010 at 02:34, Dmitry Starosta <[email protected]>wrote: > Diego, Thank you for the response. But I am still confused. > > The alias naming in the example was bad on my part. Let's change that > code to > > query.CreateAlias("Notes", > "noteAlias").Add(Restrictions.Eq("noteAlias", noteToFind /* a string > object */)); > > "noteAlias.note" in the restriction clause does not work because the > Notes property is a collection of strings and not entities. Strings do > not have mapped properties. > > I cannot do "query.Add(Subqueries.In("Notes"), detachedCriteria)" > either because the "noteToFind" string variable comes from user > interface and not the database. > > > Any help would be greatly apprecitated. > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- 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.
