[hibernate-dev] [Bean Validation] XML Mapping schema

Sanne Grinovero sanne.grinovero at gmail.com
Tue Jan 27 05:39:54 EST 2009


>
> BTW, what does <stop-inhertiance/> do?
>
> --Hardy

Hope the spec is not going out with the typo in "inheritance".

We discussed about it here : http://forum.hibernate.org/viewtopic.php?t=985463
It is meant to disable inherited contraints, for when you may want to
define some different
constraint in subclasses overriding a parent property.
I think it should be usable on the subclass: it is not always possible
to change the superclass,
(no sources, or going to break other extensions, ...)
additionally in an OO world you don't want to change the superclass
because of the need of a child class.

I agree that using it wouldn't be generally a good practice, but don't
like specs or frameworks which enforce
stuff.
Also you may want to define a more strict validator of the same type,
making the upper one useless.

Sanne



More information about the hibernate-dev mailing list