[
http://opensource.atlassian.com/projects/hibernate/browse/HV-274?page=com...
]
Emmanuel Bernard commented on HV-274:
-------------------------------------
Ah that's interesting
(exploring here)
{code}
Size size = config.createConstraintExplorer(Size.class);
config
.type( ShoppingCart.class )
.onField("items")
.addConstraint( Size.class )
.message("Youhou!")
.param( size.min(), 34)
.param( size.max(), 100);
T param(U first, U second);
{code}
It's not as readable as the generics approach nor the hardcoded one but it goes a long
way, is much simpler to set up than the generics approach and does not force people to
write their ConstraintDescriptor.
Question:
- how to deal with annotations accepting annotations as parameters
Write a programmatic mapping API for constraint declarations
------------------------------------------------------------
Key: HV-274
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-274
Project: Hibernate Validator
Issue Type: New Feature
Components: engine
Affects Versions: 4.0.2.GA
Reporter: Emmanuel Bernard
Assignee: Hardy Ferentschik
Fix For: 4.1.0
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira