cayenne-commits mailing list archives

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

     [ https://issues.apache.org/jira/browse/CAY-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

John Huss updated CAY-1638:
---------------------------

    Attachment: optional-client-validation-patch.txt

Patch attached
                
> [PATCH] Can't disable validation for CayenneContext
> ---------------------------------------------------
>
>                 Key: CAY-1638
>                 URL: https://issues.apache.org/jira/browse/CAY-1638
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: ROP
>    Affects Versions: 3.1M4
>         Environment: Mac 10.6
>            Reporter: John Huss
>            Priority: Minor
>              Labels: patch
>         Attachments: optional-client-validation-patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message