ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert L. Sapp" <as...@uiuc.edu>
Subject Re: Similar problem with the same set up....may be there is some solution already..
Date Mon, 20 Feb 2006 23:11:19 GMT
Jeff Butler wrote:

> This error means that a column in the select list is in two or more of 
> the joined tables.  You must qualify the column name with the table 
> (or alias) in the select list.
>  
> It looks to me like the "getItem" query is probably the offending 
> one.  Simple solution - put "i." in front of the itemid like this:
>  
> SELECT
>   I.ITEMID
>   ...
>  
> There may be more of these, you'll have to work them through.  I would 
> consider this a bug in JPetStore (hsqldb must be very forgiving - my 
> guess is that this would fail on most databases). It would be good of 
> you to open a JIRA ticket with the details so we don't forget to make 
> a change.
>  
> Jeff Butler
>
>
>  
> On 2/20/06, *harinder nandyala* <harindern@hotmail.com 
> <mailto:harindern@hotmail.com>> wrote:
>
>     Hello,
>
>     Many thanks for prompt response. That was an easy solution and it
>     worked. I
>     am seeing one more problem with the same setup ( i.e. DB2 driver
>     type-2).
>     When I try to add one order from petstore sample:
>
>     *****************************
>     "A reference to column "ITEMID" is ambigous. SQLSTATE=42702"
>     The error occured in com/ibatis/jpetstore/sqlmapdao/sql/Item.xml
>     Check the getItem - InlineParameterMap
>     Check the statemnent (Query Failed"
>     **********************************
>
>     Probably you may know the answer. I am trying to debug, but if
>     there is
>     ready made answer it saves a lot.
>
>     "The more you strive for humanity, the more civilized you become"
>     -ASHA
>
>     Harinder Nandyala
>     http://www.ashakiran.org
>
>
>
This same thing happened when run against a Oracle database.  Doing what 
Jeff suggests fixed it.

Al


Mime
View raw message