FAQ
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.

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

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.


Ari


--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A

Search Discussions

  • Andrus Adamchik at Jan 28, 2011 at 9:20 am

    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
  • Aristedes Maniatis at Jan 28, 2011 at 9:41 am

    On 28/01/11 8:20 PM, Andrus Adamchik wrote:
    Are you saying a flattened relationship change does not cause a validation event?
    I'd have to do some more testing to reproduce the exact situation.

    Ari



    --
    -------------------------->
    Aristedes Maniatis
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedJan 28, '11 at 6:30a
activeJan 28, '11 at 9:41a
posts3
users2
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase