Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1986

SQLTemplate returning DataObjects fails on PK column case mismatch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.0.M2
    • None
    • Core Library
    • None
    • trunk

    Description

      If you create an SQLTemplate query that returns real DataObjects (say Artist objects) and use a query like "select * from Artist limit 1" and have the primary key column defined in the DataMap with mixed case (like artist_ID) that doesn't match what the database returns for the column name, the result will contain nulls instead of objects.

      Strangely the case of the other columns does not seem to matter, only the primary key column.

      You can workaround it by naming the column all upper or lower case and configuring the SQLTemplate to force upper or lower case column names to be returned. But I think it should just work without needing to do this.

      Attachments

        Activity

          People

            Unassigned Unassigned
            johnthuss John Huss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: