ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject selectKey problem
Date Fri, 21 Jan 2005 20:45:00 GMT
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
Mime
View raw message