From: NHibernate J. <mik...@us...> - 2006-12-14 05:34:36
|
[ http://jira.nhibernate.org/browse/NH-836?page=all ] Sergey Koshcheyev resolved NH-836: ---------------------------------- Resolution: Not an Issue Doesn't look like a bug to me. Not-found="ignore" means that if there's an invalid foreign key in the database, it will just be ignored, as if there was a null there instead. It certainly doesn't change the semantics of PersistentGenericMap vs. ordinary Dictionary. If you're sure it's a bug and you have a test case to prove it, I will reopen the issue. > PersistentGenericMap doesn't really apply "not-found" > ----------------------------------------------------- > > Key: NH-836 > URL: http://jira.nhibernate.org/browse/NH-836 > Project: NHibernate > Type: Bug > Versions: 1.2.0.Beta2 > Reporter: Jerry Haltom > Priority: Trivial > > <map > name="InputItems" > lazy="true" > table="MemberInputItem"> > <key > column="MemberId" /> > <index-many-to-many > column="MemberInputId" > class="ISIS.Data.Core.MemberInput, ISIS.Data" /> > <one-to-many > not-found="ignore" > class="ISIS.Data.Core.MemberInputItem, ISIS.Data" /> > </map> > Though "not-found" is set to ignore on the one-to-many, it's meaning is a bit unclear. It doesn't actually prevent the indexer of the PersistentGenericMap from throwing an exception. I'm unsure of the intended purpose. Dictionaries now provide a TryGetValue which can be used by code which doesn't want an exception to be thrown in this circumstance. Should this not be the recommended way users of hte dictionary expect no results? -- 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 |