Column case sensitivity [Was: [2.0-STABLE] 2 patches : db relationship pks, caseless datarows]

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Dec 12 2007 - 05:01:53 EST

  • Next message: Andrus Adamchik: "Re: Board report"

    Hi

    (let's keep separate discussions in separate threads... so this
    message is about a second patch on case sensitivity).

    In general I like the idea to address the issue of column name case
    sensitivity once and for all. Also as far as I can tell your
    implementation does not have any effect on Cayenne correctness even on
    case-sensitive databases (e.g Sybase), as DataRow internal keys are
    not used in column list generation (IIRC we consistently use
    DbAttribute names). r

    My concern is that it will add some serious overhead as DataRow get/
    put operations is probably the most common one throughout the Cayenne
    stack and is invoked like millions of times in a typical active app.

    Anyways... the good news is that we solved this same problem in 3.0
    already specifically for the SQLTemplate. There is a new method called
    'setColumnNamesCapitalization' that can uppercase or lowercase result
    columns for you.

    Andrus

    On Dec 11, 2007, at 11:34 PM, Mikaël Cluseau wrote:
    > ...
    > This patch modifies DataDomainInsertBucket.
    >
    > The second is to fix a problem I had with DB2/AS400 using custom
    > templates to fetch DataObjects : the column names returned by the
    > server
    > were in upper case, and Cayenne was expecting them in lower-case. My
    > fix
    > is to normalize the keys in the DataRow, overriding get/put methods. I
    > think SQL is case insensitive for schema/table/column names, so it
    > shouldn't be a problem with any DBMS (again, I hope).



    This archive was generated by hypermail 2.0.0 : Wed Dec 12 2007 - 05:02:25 EST