From: NHibernate J. <mik...@us...> - 2006-11-28 13:12:36
|
[ http://jira.nhibernate.org/browse/NH-467?page=all ] Christian Bauer updated NH-467: ------------------------------- Comment: was deleted > Many-to-one ignores "WHERE" class mapping element on associated Class > --------------------------------------------------------------------- > > Key: NH-467 > URL: http://jira.nhibernate.org/browse/NH-467 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.0 > Reporter: Alexei > Fix For: 1.2.0.Alpha1 > > For example a Employee->User association > Class Employee: > <class name="Employee, MyApp" table="Employee" where="inactive=0" > > ... > <many-to-one name="User" class="User, MyApp" > column="UserId" unique="true" not-null="false" > > Class User: > <class name="User, MyApp" table="Users" where="inactive=0" > > Will generate SQL: > SELECT... FROM Employee this LEFT OUTER JOIN Users user1_ ON this.UserId=user1_.id WHERE this.inactive=0 > The User objects will be retrived ignoring the "inactive" flag on Users table. Similar behaviour with <bag>, <one-to-one> and others. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |