On Jan 28, 2011, at 8:29 AM, Aristedes Maniatis wrote:

> When you make a change to a relation, Cayenne validates the records at both 
> ends of the relation in total. So for example, creating a new Painting and 
> relating it to an Artist will cause the Artist validation to fire, even 
> though no database columns in Artist were modified.

Yeah, this is annoying. I know what you mean. 

> 
> The validation seems to fire across one relation, but not two, even if there 
> is a flattened relationship in between.

Are you saying a flattened relationship change does not cause a validation 
event?

> This is causing problems for us. What is the possibility that this could be 
> disabled: perhaps a flag per relation or per entity or even across the entire 
> context or datamap.

I would also like to make validation configurable. I've been thinking for some 
time of implementing validation as a DataChannelFilter tied to a @Validate 
annotation. This will allow to configure validation strategy at the filter 
level and/or annotation parameters.

Andrus

Reply via email to