Thanks German, HQL would be fine too .. could you help me a bit, cause as far as I can see the example accesses public properties of the domain object. In my case the AllTitles is a public property but it is a dictionary. i can't really figure out how to call the "val" (dictionary item) or the "culture_id" (dictionary key).
thanks! On 28 Apr., 18:47, Germán Schuager <[email protected]> wrote: > Why do you want to use criteria? > You can do this with hql like > this:http://www.nhforge.org/doc/nh/en/index.html#manipulatingdata-filtering > > On Tue, Apr 28, 2009 at 2:27 AM, Michal <[email protected]> wrote: > > > Hi, > > > I am mapping a MAP in one of my domain objects the following way: > > > <map name="AllTitles" access="nosetter.camelcase-underscore" > > table="translation"> > > <key column="record_id"></key> > > <index column="culture_id" type="Int32"></index> > > <element column="val" type="String"></element> > > </map> > > > so AllTitles is an IDictionary in my domain object. > > > How can I create a criteria query which restricts the culture_id or > > the val of the map. > > > E.g something like that. > > > session.CreateCriteria(typeof(DomainObject)).Add(Expression.Like > > ("AllTitles.element", "%your%")).List<T>() > > > Thanks for any input! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
