You say that this behavior is enabled by default... If I have entity Foo which references entity Bar, and each entity has the filters defined in their mapping, it should "just work"? Or am I doing something incorrectly?
On Mar 16, 2:59 pm, Fabio Maulo <[email protected]> wrote: > because it is a many to one... > To let you understand we have even added an option to disable the behaviour > even when the join is explicitly required. > Why this options ? > Because users have asked it in our JIRA and after a long discussion in the > development list the conclusion was the actual implementation available in > NH2.1.2 > > 2010/3/16 snicker <[email protected]> > > > > > The filter is already defined in the Bar class, and it does not get > > filtered. What ends up happening is it returns too many rows for the > > referenced EntityId because the filter ensuring a unique result is not > > applied. > > > Why does it have to be explicit? Collections can have filters and be > > lazy loaded... why can't a many-to-one reference? > > > On Mar 16, 2:21 pm, Fabio Maulo <[email protected]> wrote: > > > Then the many-to-one should be explicitly joined in the HQL. > > > > from Foo f join f.Bar > > > > The filter must be declared in Bar class. > > > > 2010/3/16 Fabio Maulo <[email protected]> > > > > > What you need is only put the filter in the related class, not in the > > > > many-to-one. > > > > > 2010/3/16 snicker <[email protected]> > > > > >> I am using 2.1.2.4000. NH throws a MappingException when I put a > > > > >> filter element in the many to one element in my mapping. Is there > > > >> something specific I should be doing? > > > > >> On Mar 16, 11:31 am, Fabio Maulo <[email protected]> wrote: > > > >> > NH2.1.2 > > > > >> > 2010/3/16 snicker <[email protected]> > > > > >> > > I have seen some posts in the nhibernate-development mailing list > > > >> > > about using filters on Many To One relationships. Can anyone tell > > me > > > >> > > if this is possible, and in what version of NH? are there > > workarounds > > > >> > > if not? > > > > >> > > -- > > > >> > > 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]> > > <nhusers%[email protected]<nhusers%[email protected]> > > > > >> <nhusers%[email protected]<nhusers%[email protected]> > > <nhusers%[email protected]<nhusers%[email protected]> > > > > >> > > . > > > >> > > For more options, visit this group at > > > >> > >http://groups.google.com/group/nhusers?hl=en. > > > > >> > -- > > > >> > Fabio Maulo > > > > >> -- > > > >> 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]> > > <nhusers%[email protected]<nhusers%[email protected]> > > > > >> . > > > >> For more options, visit this group at > > > >>http://groups.google.com/group/nhusers?hl=en. > > > > > -- > > > > Fabio Maulo > > > > -- > > > Fabio Maulo > > > -- > > 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. > > -- > Fabio Maulo -- 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.
