[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3898) Add a flag to disable Nullability.checkNullability() and the exception raised in this case

Francisco Peredo (JIRA) noreply at atlassian.com
Fri Nov 13 11:10:08 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34571#action_34571 ] 

Francisco Peredo commented on HHH-3898:
---------------------------------------

IMO hibernate.check_nullability should default to false (so that it is JPA compatible by default) and if not it should be documented with big bold letters, org.hibernate.engine.Nullability.checkNullability is a major problem if you want to validate newly persisted objects when the transaction ends.

I still think that adding support for the "optional=true and nullable=false" (see my comment in my blog: http://luxspes.blogspot.com/2009/11/jpa-myth-eclipselink-and-hibernate-are.html) solution would have been much more flexible (I would have allowed to turn on/off org.hibernate.engine.Nullability.checkNullability on a "individual property" basis)

> Add a flag to disable Nullability.checkNullability() and the exception raised in this case
> ------------------------------------------------------------------------------------------
>
>                 Key: HHH-3898
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3898
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>            Reporter: Emmanuel Bernard
>             Fix For: 3.5.0.Beta-1
>
>
> Useful when Bean Validation is on as otherwise the checkNullability is applied before BV has time to kick in and messes up the expected exception
> The default must be true as capt obvious rightly pointed out ;)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list