Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1638

[PATCH] Can't disable validation for CayenneContext

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1B1
    • 3.1B1
    • ROP
    • Mac 10.6

    Description

      Validation can't be disabled for CayenneContext like it can for DataContext using setValidatingObjectsOnCommit(false). This probably isn't generally a problem since the out-of-the-box entity templates for client objects don't implement the Validating interface so validation doesn't happen by default. But CayenneContext will already do validation if you implement the interface. So if you make you objects implement Validating, then it will do validation, but you have no way to turn it off if you don't want it all the time.

      The solution is to:
      1) pull up the validatingObjectsOnCommit property into BaseContext so it can be used in CayenneContext as well as DataContext
      2) check the validatingObjectsOnCommit property before doing validation in CayenneContext

      Attachments

        Activity

          People

            Unassigned Unassigned
            johnthuss John Huss
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified