cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Huss (Created) (JIRA)" <>
Subject [jira] [Created] (CAY-1638) [PATCH] Can't disable validation for CayenneContext
Date Wed, 02 Nov 2011 21:55:33 GMT
[PATCH] Can't disable validation for CayenneContext

                 Key: CAY-1638
             Project: Cayenne
          Issue Type: Improvement
          Components: ROP
    Affects Versions: 3.1M4
         Environment: Mac 10.6
            Reporter: John Huss
            Priority: Minor
         Attachments: optional-client-validation-patch.txt

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

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message