is there any work-around for this until it will be new released? thanks a lot for any help.
On Sep 22, 2:57 pm, schlachtzeuger <[email protected]> wrote: > yeah, that true, fixed in 2.1.x brunch 4691 (issue 1927), and i'm on > 4687 ;), sorry for that. > go and update, thats why i'm loving oss > > On Sep 22, 6:37 am, Fabio Maulo <[email protected]> wrote: > > > > > probably it was fixed in 2.1.x branch > > > 2009/9/21 schlachtzeuger <[email protected]> > > > > i have a filter defined on a on-to-many set. > > > > after enabling it: > > > > session.EnableFilter("test").SetParameter("isActive", false); > > > > this hql:. > > > > session.CreateQuery("select o from Order as o left outer join fetch > > > o.Lines where o.Id = :orderId") > > > .SetGuid("orderId", orderId) > > > .UniqueResult<Order>(); > > > > gives me this sql (shortened for readability): > > > > select * > > > from Order > > > left outer join Lines > > > on Order.Id = Lines.FkOrdersId > > > and 0 = Lines.IsActive > > > where Order.Id = '1dcdb688-c30f-4fcc-8bb0-9c8b00239d54' > > > > but if a use this criteria: > > > > session.CreateCriteria<Order>() > > > .SetFetchMode("Lines", FetchMode.Eager) > > > .Add(Restrictions.Eq("Id", orderId)) > > > .UniqueResult<Order>(); > > > > i get this sql (shortened for readability): > > > > select * > > > from Order > > > left outer join Lines > > > on Order.Id = Lines.FkOrdersId > > > and 0 = Lines.IsActive > > > where Order.Id = '1dcdb688-c30f-4fcc-8bb0-9c8b00239d54' > > > and 0 = Lines.IsActive > > > > !! note that the filter restriction is also applyed to the where > > > clause when using criteria api > > > > My question: > > > > How do i have to use the criteria api to get the same sql as with > > > hql, which means that the filter restriction is only applied to the > > > join and not to the where clause? > > > > Thank you > > > -- > > Fabio Maulo- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
