|
I thought a bit about this one before and adding the contract and making in pluggable via a HV specific feature is easy. The interesting thing was, how to get hold of the time provider in a constraint validator (eg Past). I see basically two options:
-
Have some homegrown injection solution for this (nasty and might be a bit work)
-
Provide access via HibernateConstraintValidatorContext. Quite simple, the drawback being that the provider would only be accessible during the isValid call
|