You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "John Huss (Created) (JIRA)" <ji...@apache.org> on 2011/11/02 22:55:33 UTC

[jira] [Created] (CAY-1638) [PATCH] Can't disable validation for CayenneContext

[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
         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CAY-1638) [PATCH] Can't disable validation for CayenneContext

Posted by "Andrus Adamchik (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1638.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M4

Good catch. Applied to trunk.
                
> [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
>             Fix For: 3.1M4
>
>         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

        

[jira] [Updated] (CAY-1638) [PATCH] Can't disable validation for CayenneContext

Posted by "John Huss (Updated) (JIRA)" <ji...@apache.org>.
     [ 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