[hibernate-issues] [Hibernate-JIRA] Commented: (HV-487) Settle on an approach for instantiating constraint definitions
Hardy Ferentschik (JIRA)
noreply at atlassian.com
Thu Jun 9 04:00:26 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42549#action_42549 ]
Hardy Ferentschik commented on HV-487:
--------------------------------------
Really 1 + 2 are implemented, because both are possible in the current implementation.
> Settle on an approach for instantiating constraint definitions
> --------------------------------------------------------------
>
> Key: HV-487
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-487
> Project: Hibernate Validator
> Issue Type: Task
> Components: engine
> Reporter: Gunnar Morling
> Assignee: Hardy Ferentschik
> Fix For: 4.2.0.Final
>
>
> Due to the addition of method constraints the completely fluent way for instantiating constraint definitions in the mapping API doesn't work anymore. The alternatives discussed so far include:
> (1):
> {code:java}
> mapping.type( Marathon.class )
> .property( "name", METHOD )
> .constraint( new NotNullDef() )
> {code}
> (2):
> {code:java}
> mapping.type( Marathon.class )
> .property( "name", METHOD )
> .constraint( ConstraintDef.create( NotNullDef.class ) )
> {code}
> (3):
> {code:java}
> mapping.type( Marathon.class )
> .property( "name", METHOD )
> .constraint( NotNullDef.create() )
> {code}
> One approach must be chosen and implemented (as of HV-431 (2) is implemented). Also the reference guide must be updated.
--
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