Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C565C17932 for ; Wed, 4 Feb 2015 02:20:33 +0000 (UTC) Received: (qmail 79425 invoked by uid 500); 4 Feb 2015 02:20:34 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 79399 invoked by uid 500); 4 Feb 2015 02:20:34 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 79389 invoked by uid 99); 4 Feb 2015 02:20:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 02:20:34 +0000 Date: Wed, 4 Feb 2015 02:20:34 +0000 (UTC) From: "John Huss (JIRA)" To: commits@cayenne.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAY-1986) SQLTemplate returning DataObjects fails on PK column case mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAY-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14304507#comment-14304507 ] John Huss commented on CAY-1986: -------------------------------- Just ignore case? It already does for all the other column except the PK. > SQLTemplate returning DataObjects fails on PK column case mismatch > ------------------------------------------------------------------ > > Key: CAY-1986 > URL: https://issues.apache.org/jira/browse/CAY-1986 > Project: Cayenne > Issue Type: Bug > Components: Core Library > Affects Versions: 4.0.M2 > Environment: trunk > Reporter: John Huss > Priority: Minor > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)