RE: Need help with getting long strings

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Fri Apr 29 2005 - 12:46:45 EDT

  • Next message: Dhruti Ramani: "RE: Need help with getting long strings"

    Well, I was close. From the PostgreSQL 8.0.1 documentation:

    "If you desire to store long strings with no specific upper limit, use
    'text' or 'character varying' without a length specifier, rather than
    making up an arbitrary length limit."

    I'd think a LONGVARCHAR mapping at the DbEntity level and a String at
    the Java level would work fine, but I've not tested it.

    Good luck,

    /dev/mrg

    -----Original Message-----
    From: Gentry, Michael (Contractor) [mailto:michael_gentr..anniemae.com]

    Sent: Friday, April 29, 2005 12:40 PM
    To: cayenne-use..bjectstyle.org
    Subject: RE: Need help with getting long strings

    In the DbEntity, use a LONGVARCHAR or LONGVARBINARY or BLOB or CLOB
    (whichever makes more sense) ... I think in PostgreSQL you'll have a
    TEXTA type (but I'm pretty rusty on that right now).

    -----Original Message-----
    From: Dhruti Ramani [mailto:dhrutiraman..ahoo.com]
    Sent: Friday, April 29, 2005 12:35 PM
    To: Cayenne-User
    Subject: Need help with getting long strings

    Hi,

    I think i have posted this question before but I missed the answer.

    i am using postgres as database. One of my field (java String) has to be
    really long so user can store as much as they want. And I don't know the
    limit. Is it possible to do this in cayenne modeler? Right now I have
    that field as VARCHAR but in that I have to define max. no. of
    characters.

    Any comments?

    Denna



    This archive was generated by hypermail 2.0.0 : Fri Apr 29 2005 - 12:46:50 EDT