I tried to cast the primary key to an int but that did not change anything.
-----Original Message----- From: Ron Grabowski [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 11:13 AM To: ibatis-user-cs@incubator.apache.org Subject: RE: Cannot widen from target type to primitive type. This probably doesn't answer your question, but we use Sql Server 2000 and cast our primary keys to ints in our <selectKey>s: <selectKey property="FooID" type="post" resultClass="int"> SELECT CAST(@@IDENTITY as int) as value </selectKey> It looks like the test cases are using: select @@IDENTITY as value so the cast may not be necessary in future versions. --- "Keslar, Jeremy" <[EMAIL PROTECTED]> wrote: > It appears as though I am getting this error from my selectKey > statement. > When I remove the selectKey statement everything works fine. Any > suggestions? > > Jeremy > > -----Original Message----- > From: Roberto Rabe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 27, 2005 10:13 AM > To: ibatis-user-cs@incubator.apache.org > Subject: RE: Cannot widen from target type to primitive type. > > Hmmm...Well, they can write out the create table DDL using INTEGER, > but if > they're not comfortable writing it out... :-( > > Roberto > > > On Tue, April 26, 2005 9:46, Ron Grabowski said: > > Yes, they're using DataMapper v1.1.458.0. I've looked at the > IBatisNet > > test cases and everything looks normal to me. They say that in > their > > Oracle manager (or whatever the Oracle equivalent of Sql Server's > > Enterprise Manager is) they don't see INT as a type in the type > drop > > down list. Its becoming mildly annoying to look at their code and > see > > decimals everywhere. > > > > --- Roberto Rabe <[EMAIL PROTECTED]> wrote: > >> Yes, there is Oracle support for the ANSI INT/INTEGER subtype, but > it > >> just > >> means NUMBER(38,0) (a synonym). Are they using the DataMapper? > >> > >> Roberto > >> > >> On Tue, April 26, 2005 9:19, Ron Grabowski said: > >> > I've been helping on a project using an Oracle 9(?) server. > They're > >> > using decimals at the moment for their primary key > representation. > >> They > >> > said that Oracle doesn't have an INT datatype and that > NUMBER(10) > >> > caused problems. I suggested they use NUMBER(9) so they could > map > >> > primary keys to System.Int32. Do you have experience with Oracle > >> > Roberto? Does the missing INT thing sound familiar? Very > strange... > >> > > >> > --- Roberto Rabe <[EMAIL PROTECTED]> wrote: > >> >> Oracle-support using the Microsoft provider that you are using > >> became > >> >> a > >> >> little more consistent with the DataMapper 1.1 Alpha build. On > >> that > >> >> note, > >> >> have you tried a decimal type field? (Unfortunately, I can't > >> >> remember if > >> >> that worked with OracleClient in that version of the > DataMapper.) > >> >> > >> >> Roberto > >> >> > >> >> > >> >> > >> >> On Mon, April 25, 2005 17:37, Keslar, Jeremy said: > >> >> > I am using Microsoft's Oracle data provider and the > DataMapper > >> from > >> >> > iBatisNet release 1.0.1.321. > >> >> > > >> >> > > >> >> > -----Original Message----- > >> >> > From: Roberto Rabe [mailto:[EMAIL PROTECTED] > >> >> > Sent: Monday, April 25, 2005 5:27 PM > >> >> > To: ibatis-user-cs@incubator.apache.org > >> >> > Subject: Re: Cannot widen from target type to primitive type. > >> >> > > >> >> > What provider are you using and what version of the > DataMapper? > >> >> > > >> >> > Roberto > >> >> > > >> >> > On Mon, April 25, 2005 17:18, Keslar, Jeremy said: > >> >> >> I am trying to retrieve data from Oracle. Everything is > >> working > >> >> fine > >> >> >> except for the Oracle fields with the type Number (8,2). I > >> have > >> >> tried > >> >> >> changing my data types in the code to double, single, etc, > but > >> I > >> >> keep > >> >> >> getting the error "Cannot widen from target type to > primitive > >> >> type." > >> >> >> Does anyone have any ideas? > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> Jeremy > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > > >> >> > >> >> > >> > > >> > >> > > > >