ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Odelya Glick" <ode...@jpost.com>
Subject Problem with insertKey
Date Fri, 02 Nov 2007 02:20:46 GMT

Hi,

I am trying to receive primary key with:
<insert id="insertCondolence" parameterClass="condolence">
		<selectKey keyProperty="id" resultClass="int">
			SELECT obituary_seq.NEXTVAL AS value FROM dual
		</selectKey>
		INSERT INTO CONDOLENCE(ID, STATUS)
		VALUES(#id#,#status#)
	</insert>

The condolence class has 2 properties:
String id;
String status;

But it always inserts a record with the right status value, but id value is
always null!!

Why? 

Thanks
Odelya
web-programmer
050-2052075
 



Mime
View raw message