From: NHibernate J. <mik...@us...> - 2006-12-13 22:40:31
|
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 |