]
Dan Allen updated ANN-703:
--------------------------
Attachment: FutureValidator.java
@Past and @Future should support inclusive and exclusive boundaries
-------------------------------------------------------------------
Key: ANN-703
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-703
Project: Hibernate Annotations
Issue Type: Improvement
Components: validator
Affects Versions: 3.3.1.CR1
Reporter: Dan Allen
Fix For: 3.3.1
Attachments: FutureValidator.java, PastValidator.java
Original Estimate: 2 hours
Remaining Estimate: 2 hours
The @Future and @Past annotations do not offer a way to include the current date in the
range, operating under the pretense of an exclusive boundary condition. The current date
is often needed in the range. For instance, a registration date can be today or any time
in the future. You might have recorded an observation today or any time in the past.
My suggestion is to add an attribute named "inclusive" which implies that the
current date is included.
@Future(inclusive = true)
@Past(inclusive = true)
Feel free to use another name for the attribute. The default, of course, is false for
backwards compatibility.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: