validation on one relation

From: Aristedes Maniatis (ar..sh.com.au)
Date: Fri May 30 2008 - 06:10:00 EDT

  • Next message: Andrey Razumovsky (JIRA): "[jira] Updated: (CAY-1056) Detection of the project file changes on disk."

    We have Artist and Painting entities. Artist has validation code which
    is relatively slow to run (checks for duplicate Artists and some other
    things): maybe 0.5 seconds to execute.

    When we add a new Painting record, it turns out that the Artist
    validation is fired, even though the Artist record in the database
    isn't touched in any way. Sure the relationship to paintings is
    philosophically altered by the addition of a new record, but should
    that be enough to fire validation? No actual change took place.

    In our case, when we create 50,000 paintings in a batch (this artist
    has a team of low paid illustrators in his back shed), this slows
    things down a lot.

    Is this behaviour:

    [ ] expected & desirable
    [ ] an option which could be disabled
    [ ] unhelpful and should go away

    For my part, it is a little annoying, although we could possibly
    accelerate the Artist validation by determining which attributes
    changed and only firing relevant validation.

    Cheers
    Ari

    -------------------------->
    ish
    http://www.ish.com.au
    Level 1, 30 Wilson Street Newtown 2042 Australia
    phone +61 2 9550 5001 fax +61 2 9550 4001
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A



    This archive was generated by hypermail 2.0.0 : Fri May 30 2008 - 06:10:46 EDT