You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Ari Maniatis (JIRA)" <ji...@apache.org> on 2010/01/06 10:17:54 UTC

[jira] Updated: (CAY-991) isMandatory() and getMaxLength() should be members of ObjAttributeб not only ClientObjAttribute

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

Ari Maniatis updated CAY-991:
-----------------------------

    Fix Version/s: Undefined future

> isMandatory() and getMaxLength() should be members of ObjAttributeб not only ClientObjAttribute
> -----------------------------------------------------------------------------------------------
>
>                 Key: CAY-991
>                 URL: https://issues.apache.org/jira/browse/CAY-991
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>            Reporter: Andrey Razumovsky
>            Assignee: Andrey Razumovsky
>            Priority: Minor
>             Fix For: Undefined future
>
>
> While working on client side (using ROP) or server side, developer my access isMandatory and getMaxLength properties of an ObjAttribute. On server this is usually done by getDbAttribute().isMandatory() and getDbAttribute().getMaxLength(). Since DbEntities are not being sent to client, these two properties are manully set in ClientObjAttribute. So it makes sense to make isMandatory() and getMaxLength() members of ObjAttribute with reference to the same props of DbAttribute for server class, and reference to own ClientObjAttribute class fields for clint implementation.
> This is important for validation, because current validateForSave() method of CayenneDataObject cannot be anyhow applied to client objects. I don't think client objects should by default implement Validating, because validation code would execute twice this way (on client and on server). But still it would be nice to see validation method somewhere (maybe in DataObjectUtils) so that i could check my objects BEFORE commit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.