not-null integrity must be checked for DML statements and not for objects

Description

This issue somehow relates to but is of much broader scope and pointing out a different aspect.

Currently Hibernate checks the not-null constraint integrity persisting any object already on the object level (which is a quite early point in time; for loading objects, this might cause analoguous problems).

The not-null XML attribute, however, is part of the <column> tag and therefore is assumed to match the characteristics of a column and not a mapped object property!
I am facing severe problems with the current behaviour, as the not-null check is performed even before
any nullSafePut() method is executed for a customized Hibernate type, or even before any the any PreInsertEventListener / PreUpdateEventListener has a chance to transform null-values for properties to non-null values for database columns.
Effectively, the flexibility to handle different nullability characteristics between columns and their mapped properties is thus reduced to zero.

Environment

Windows XP
Eclipse 3.5.1
Teneo 1.0.3

Activity

Show:
Emmanuel Bernard
April 9, 2010, 5:42 PM

Check hibernate.check_nullability=false
That probably works.

Steve Ebersole
March 21, 2011, 7:08 PM

Bulk closing stale resolved issues

Rejected

Assignee

Unassigned

Reporter

Markus Bohr

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major