[hibernate-issues] [Hibernate-JIRA] Commented: (HV-480) Constraints configured via XML and programmatic API aren't merged
Gunnar Morling (JIRA)
noreply at atlassian.com
Sun Jun 5 11:55:27 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42477#action_42477 ]
Gunnar Morling commented on HV-480:
-----------------------------------
Provided test case at https://github.com/gunnarmorling/hibernate-validator/commit/ec6e783a199093394466484f5482ae07929b3149
> Constraints configured via XML and programmatic API aren't merged
> -----------------------------------------------------------------
>
> Key: HV-480
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-480
> Project: Hibernate Validator
> Issue Type: Bug
> Reporter: Gunnar Morling
> Fix For: 4.x
>
>
> The HV reference guide says
> {quote}
> [The programmatic] API can be used exclusively or in combination with annotations and xml. If used in combination programmatic constraints are additive to otherwise configured constraints.
> {quote}
> While that is right for constraints configured via annotations and programmatic API this does currently not work for constraints configured via XML and programmatic API. Currently a type's XML configuration has precedence over its programmatic configuration. The cause is that once the meta data for a type is added to the bean meta data cache in {{ValidatorFactoryImpl#initXmlConfiguration()}} programmatic meta data won't be added or merged in {{initProgrammaticConfiguration()}}.
--
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