ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashanth Sukumaran <prashanthsukuma...@yahoo.com>
Subject Re: selectKey problem
Date Fri, 21 Jan 2005 20:59:08 GMT
Hi Nathan,

Have you tried P6Spy.  That can be your best friend for such issues.  It is very easy to install
and it shows you exactly the query that is executed at runtime.  

It won't take you more than an hour to set it up and get it working.  For Jakarta Tomcat i
like 10-15 mins to get it up and running.

It can be configured for
JBoss 2.x ,JBoss 3.x ,Orion ,Jakarta Tomcat 
JOnAS EJB ,BEA WebLogic ,BEA WebLogic Portal 
BEA WebLogic Server ,BEA WebLogic 
ATG Dynamo ,Sun iPlanet 
IBM WebSphere,Caucho Resin 

Take a look at this http://www.p6spy.com/documentation/index.htm


--- Nathan Maves <Nathan.Maves@Sun.COM> wrote:

> using the statement below we are getting an invalid column type error.  
> The Log class has a String property named id, and the oracle sequence 
> works fine.
> <insert id="insertMetricLog" parameterClass="Log">
>       <selectKey resultClass="string" keyProperty="id">
>           select SD_METRIC_LOG_CURRENT_ID.nextval as id from dual
>       </selectKey>
>       insert into SD_METRIC_LOG (
>           id,
>           emp_id,
>           modified_date,
>           dashboard_id,
>           category_id,
>           metric_id,
>           log
>           ) values (
>           #id#,
>           #employeeNumber#,
>           SYSDATE,
>           (select dashboard_id from SD_CATEGORY where id =
>               (select category_id from SD_METRIC where id = #metricId#)),
>           (select category_id from SD_METRIC where id = #metricId#),
>           #metricId#,
>           #log#
>           )
>     </insert>
> Nathan

Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.

View raw message