[hibernate-issues] [Hibernate-JIRA] Created: (ANN-746) Implemented BigDecimalRange Validator for BigDecimals with precision range and scale
Priya M (JIRA)
noreply at atlassian.com
Sun Jun 1 20:08:33 EDT 2008
Implemented BigDecimalRange Validator for BigDecimals with precision range and scale
------------------------------------------------------------------------------------
Key: ANN-746
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-746
Project: Hibernate Annotations
Issue Type: New Feature
Reporter: Priya M
Attachments: BigDecimalRange.java, BigDecimalRangeValidator.java
Currently, hibernate validator's do not have @Range or @Length for decimal numbers (like float, double and BigDecimal) for validating precision and scale simultaneously. Also, Hibernate doesn't generate correct db column types as Number(x,y) if Java Type is Float or Double. However it works only for BigDecimal.
I've added the annotation for BigDecimalRange and BigDecimalRangeValidator for the same
Usage
@BigDecimalRange(minPrecision=0, maxPrecision=13, scale=2)
public BigDecimal getFoo() {
return this.foo;
}
It works for my app.
--
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