ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MrNobody <tony.loz...@pepsi.com>
Subject Can't get this selectKey element working
Date Tue, 20 Nov 2007 20:50:52 GMT

I am trying to use selectKey to generate my ID from an Oracle sequence but I
can't figure out the correct usage. Searching on the Internet yields many
tutorials and when I try doing them EXACTLY as they instruct I get errors-
probably due to version differences.

Here's what I'm trying to do:

<selectKey keyProperty="id" resultClass="int">
  SELECT MY_SEQ.nextVal AS id FROM DUAL
</selectKey>
insert into MyTable (my_id, my_value)
values (#id#, #value#)

And I get the error:

Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException:
Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath
'/sqlMap/insert'.  Cause: com.ibatis.common.beans.ProbeException: There is
no READABLE property named 'id' in class 'com.mytest.MyTest'

why does it keep trying to load id from the parameter class while ignoring
the selectKey ??
-- 
View this message in context: http://www.nabble.com/Can%27t-get-this-selectKey-element-working-tf4846284.html#a13865417
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message