Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 467B54B9E for ; Fri, 13 May 2011 15:02:56 +0000 (UTC) Received: (qmail 56495 invoked by uid 500); 13 May 2011 15:02:56 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 56482 invoked by uid 500); 13 May 2011 15:02:56 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 56474 invoked by uid 99); 13 May 2011 15:02:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 15:02:56 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [66.94.237.221] (HELO nm20.access.bullet.mail.mud.yahoo.com) (66.94.237.221) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 13 May 2011 15:02:49 +0000 Received: from [66.94.237.199] by nm20.access.bullet.mail.mud.yahoo.com with NNFMP; 13 May 2011 15:02:28 -0000 Received: from [66.94.237.117] by tm10.access.bullet.mail.mud.yahoo.com with NNFMP; 13 May 2011 15:02:28 -0000 Received: from [127.0.0.1] by omp1022.access.mail.mud.yahoo.com with NNFMP; 13 May 2011 15:02:28 -0000 X-Yahoo-Newman-Id: 201803.46514.bm@omp1022.access.mail.mud.yahoo.com Received: (qmail 66134 invoked from network); 13 May 2011 15:02:27 -0000 Received: from [192.168.1.10] (awillerding@99.242.247.174 with plain) by smtp105.rog.mail.bf1.yahoo.com with SMTP; 13 May 2011 08:02:27 -0700 PDT X-Yahoo-SMTP: ChVU2eqswBDSFej3Lf4i2Y53UZyBmGcLKhIKvoPeYDa9tHhZulM- X-YMail-OSG: EaWFch4VM1kQOrTr8VKYnSWvc8Vvkg2TWFJ2S1tCOZLHiJ. 41DACCsDaw6u5.1RalQK8X8oCcT.7jqzAWFtPY4eqtMuwjtYaky_Ucw5A4Jc W2WtQo3FsS1bKsQeL3vFy76rPUlvOH4ATmhlW4UVCOih9qXjcXBD8xPyttTM J7wg1KnQlRnUNerwFuPRDXnrgLNM0tTGRjHp48Oo4IQWjZ3ne0rG1h84G0LS zWu0WFe3W0lp6hFYJmxPbk6KeIIrvBqMj_23w4ISgbHLJv6h79suJVe0z1He UPZa.SIRDSBeEgU4iGdHQalC.FBEoTx4DbP5S69kGWa9ScCYRH1a59bCRV41 4bmD65MA7zGVWWDpeBsOgTvDb4dHvIMQG.hM5WqNeY6l6IxvAZOeA2fSZid1 J2DgTTdFd2Pn4AYblA.xhADV.1jYkWMNDYrdEyr8wZWzoTlLOpepRHaqajmx 8ef8Pqlz3l4lg16.768sihYhbyLu97RcgVyI.Av47HvgTZkot.7UXl2Ys2ea T.Ti50f.ecHMtINXrClYuMPWrMdyTPDENvLl.T2737ePym9m40JdlOAi_t86 .xRFGJiru6nPbYQuLbQ-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4DCD4803.8090104@callistacti.com> Date: Fri, 13 May 2011 11:02:27 -0400 From: Andrew Willerding Reply-To: awillerding@callistacti.com Organization: Callista Computer Telephony Inc. User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: user@cayenne.apache.org Subject: Re: DB2 V7 strange bug I think References: <4DCBF913.6000602@callistacti.com> <4DCD3070.4000709@callistacti.com> <38B6A390-3741-4166-BB7C-081A4AE3CBC1@objectstyle.org> <4DCD3F98.4070008@callistacti.com> In-Reply-To: <4DCD3F98.4070008@callistacti.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I inserted the select.setColumnNamesCapitalization(CapsStrategy.UPPER); into the code and now both MySQL and DB2 return the null data items. On 05/13/2011 10:26 AM, Andrew Willerding wrote: > I am a very casual but committed user of Cayenne so my knowledge of > Cayenne is not very deep ;-) I was drawn to its use because I > disliked the XML configurations necessary in other ORM frameworks. I > hope I'm helping and not hindering it's continued development. > > Here's the trace with MySQL. The columns are definitely lower case in > this situation. I will try the setColumnNameCapitalization method to > see if it makes the improvement to DB2 without jeopardizing MySQL. > > > > 2011-05-13 08:40:53,311 [http-8084-1] INFO > org.apache.cayenne.access.QueryLogger - Select * from > SurveyResultDetails where survey_id = 1 and question in (Select > question from SurveyQuestions, SurveyQuestionTypes where > SurveyQuestionTypes.id = 5 and SurveyQuestions.question_type_id = 5) > order by result, survey_dts > 2011-05-13 08:40:53,317 [http-8084-1] INFO > org.apache.cayenne.access.QueryLogger - === returned 3 rows. - took 6 ms. > 2011-05-13 08:40:53,318 [http-8084-1] INFO > org.apache.cayenne.access.QueryLogger - +++ transaction committed. > SurveyResultDetails > item=org.apache.cayenne.DataRow@3b1674f0[values={id=50, result=0, > caller_id=5001110410145147, survey_dts=Sun Apr 10 14:53:17 EDT 2011, > rec_msg=101453001, question=12, lang=EN, survey_id=1, note=}, > version=-9223372036854775804, replaces=-9223372036854775808] > SurveyResultDetails > item=org.apache.cayenne.DataRow@3f5756de[values={id=60, result=0, > caller_id=5001110410151543, survey_dts=Sun Apr 10 15:17:11 EDT 2011, > rec_msg=101517001, question=12, lang=EN, survey_id=1, note=}, > version=-9223372036854775803, replaces=-9223372036854775808] > SurveyResultDetails > item=org.apache.cayenne.DataRow@7f08294e[values={id=88, result=0, > caller_id=5001110410161501, survey_dts=Sun Apr 10 16:16:46 EDT 2011, > rec_msg=101616001, question=12, lang=EN, survey_id=1, note=}, > version=-9223372036854775802, replaces=-9223372036854775808] > > > > > On 05/13/2011 10:14 AM, Andrus Adamchik wrote: >> Sorry I may have not made it clear, but the point of this exercise >> was not to produce data rows, but to uncover and debug the >> differences between MySQL and DB2. So could you print out the data >> rows (like you did below) for BOTH databases and check the differences. >> >> More specifically I am trying to determine whether you need to use >> 'setColumnNamesCapitalization' per >> >> http://cayenne.apache.org/doc30/advanced-sqltemplate.html >> >> Andrus >> >> >> On May 13, 2011, at 4:21 PM, Andrew Willerding wrote: >> >>> That worked to retrieve a DataRow object. The data is there now. >>> Is there some way to convert this now into a usable cayenne data >>> object without pulling the columns out of the HashMap one column at >>> a time? Or is there an underlying bug that is at the root why this >>> is works for MySQL but not for DB2 V7? >>> >>> 2011-05-13 08:43:45,595 [http-8080-1] INFO >>> org.apache.cayenne.access.QueryLogge >>> r - Select * from SurveyResultDetails where survey_id = 1 and >>> question in (Selec >>> t question from SurveyQuestions, SurveyQuestionTypes where >>> SurveyQuestionTypes.i >>> d = 5 and SurveyQuestions.question_type_id = 5) order by result, >>> survey_dts >>> 2011-05-13 08:43:45,796 [http-8080-1] INFO >>> org.apache.cayenne.access.QueryLogge >>> r - === returned 10 rows. - took 201 ms. >>> 2011-05-13 08:43:45,796 [http-8080-1] INFO >>> org.apache.cayenne.access.QueryLogge >>> r - +++ transaction committed. >>> SurveyResultDetails >>> item=org.apache.cayenne.DataRow@1533c8[values={SURVEY_DTS=Su >>> n Apr 10 14:53:17 EDT 2011, REC_MSG=101453001, RESULT=0, >>> QUESTION=12, ID=50, NOT >>> E=null, CALLER_ID=5001110410145147, LANG=EN, SURVEY_ID=1}, >>> version=-922337203685 >>> 4775804, replaces=-9223372036854775808] >>> SurveyResultDetails >>> item=org.apache.cayenne.DataRow@1faa614[values={SURVEY_DTS=S >>> un Apr 10 15:17:11 EDT 2011, REC_MSG=101517001, RESULT=0, >>> QUESTION=12, ID=60, NO >>> TE=null, CALLER_ID=5001110410151543, LANG=EN, SURVEY_ID=1}, >>> version=-92233720368 >>> 54775803, replaces=-9223372036854775808] >>> >>> On 05/13/2011 06:48 AM, Andrus Adamchik wrote: >>>> I can suggest a test: >>>> >>>> select.setFetchingDataRows(true) >>>> >>>> and then print and compare the results between 2 DB's. >>>> >>>> Andrus >>>> >>> > > -- Andrew Willerding Callista CTI ph: 416 444-9702 x9455 fx: 416 444-9732 cell: 416 712-2323 www: http://www.callistacti.com