From: NHibernate J. <mik...@us...> - 2006-12-04 20:20:37
|
[ http://jira.nhibernate.org/browse/NH-268?page=comments#action_14525 ] Bastiaan de Rijber commented on NH-268: --------------------------------------- Sorry Segey, I should've known better and learn how to type. I made a mistake in the mapping and this was causing it not to work. Isn't the saying "Never blame the compiler"? ;) > "not-found" attribute on relation mappings > ------------------------------------------ > > Key: NH-268 > URL: http://jira.nhibernate.org/browse/NH-268 > Project: NHibernate > Type: New Feature > Components: Core > Versions: beta-0.8 > Environment: Windows XP Pro. > SQL Server 2000. > Reporter: Tyler Burd > Fix For: 1.2.0.Beta1 > Attachments: NH268.patch, NH268_NewTestFiles.zip > > Hibernate 3 has an attribute on the relation mapping elements (many-to-one, etc) called "not-found". This attribute specifies how NHibernate should handle orpaned relationships. > A link to Hibernate 3 docs regarding not-found: > http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html#mapping-declaration-manytoone > From the docs: > --- > > not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will be handled: ignore will treat a missing row as a null association. > --- > > I've got a ton of legacy data with orphaned relationships, and it would be _wonderful_ if I could have NHibernate NOT throw an exception and just set the reference to null. -- 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 |