You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Lon Varscsak <lo...@gmail.com> on 2015/08/26 22:01:58 UTC

Trimming attribute values

Hey all,

I have some attributes that are of 'char' type, and at least in Sybase,
this returns a string that isn't trimmed...however, all of my code expects
these values to be trimmed in the objects.  In EOF you could specify in the
model that the type was a String (TRIM)...which handled all the details on
fetching and insert.  Any thoughts on how to accomplish this for certain
attributes in Cayenne?

Thanks,

Lon

Re: Trimming attribute values

Posted by Lon Varscsak <lo...@gmail.com>.
Never mind. :)  I found that my data types on the db entity were set as
VARCHAR and not CHAR (which does the right thing).

Thanks,

Lon

On Wed, Aug 26, 2015 at 1:01 PM, Lon Varscsak <lo...@gmail.com>
wrote:

> Hey all,
>
> I have some attributes that are of 'char' type, and at least in Sybase,
> this returns a string that isn't trimmed...however, all of my code expects
> these values to be trimmed in the objects.  In EOF you could specify in the
> model that the type was a String (TRIM)...which handled all the details on
> fetching and insert.  Any thoughts on how to accomplish this for certain
> attributes in Cayenne?
>
> Thanks,
>
> Lon
>