From: Mike P. (JIRA) <nh...@gm...> - 2011-04-22 20:21:39
|
[ http://216.121.112.228/browse/NH-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Pontillo updated NH-2668: ------------------------------ Attachment: NH2667-fix.patch This is my tentative fix for the problem. There are three issues: (1) The IsOptional or IsNullable property needs to be set on the version Mapping.Property, or NHibernate will validate it incorrectly (at least, in my test case) because it thinks there should be a non-NULL constraint on the column. I am not sure what the correct fix is, but adding the line in RootClassBinder worked for me. (2) Versioning always assumes a non-null version property. (3) AbstractEntityPersister makes several assumptions that the version property is not null. > REOPEN: Version properties which are NULL in the database cause exceptions during a delete or update > ---------------------------------------------------------------------------------------------------- > > Key: NH-2668 > URL: http://216.121.112.228/browse/NH-2668 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA, 3.0.0.Alpha1, 3.0.0.Alpha2, 3.0.0.Alpha3, 3.0.0.Beta1, 3.0.0.Beta2, 3.0.0.CR1, 3.0.0.GA, 3.1.0, 3.2.0Alpha1, 3.2.0Alpha2 > Reporter: Mike Pontillo > Priority: Major > Attachments: NH2667-fix.patch, NH2667-TestCases.patch > > > Reopening NH-2667 as a new defect since it appears that I cannot reopen it myself. NH-2667 was closed before I could even attach the test case. Please don't close this yet; let the test case speak for itself. > I tried using unsaved-value and it did not work. There are, in fact, bugs here. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |