ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: iBATIS insert does not execute
Date Sat, 19 Apr 2008 12:40:04 GMT
That should work with the Java version. You are using unsupported
attributes, relevant DTD-piece:

<!ELEMENT selectKey (#PCDATA | include)*>
<!ATTLIST selectKey
resultClass CDATA #IMPLIED
keyProperty CDATA #IMPLIED
type (pre|post) #IMPLIED
>

I don't know if that helps, try enabling debug to see if the
selectKey-query gets executed, and if so, what results are returned.

HTH,

Niels

-----Original Message-----
From: Chris Marshall [mailto:chris@campsbayterrace.com] 
Sent: Saturday, April 19, 2008 10:17 AM
To: user-java@ibatis.apache.org
Subject: Re: iBATIS insert does not execute

Hopefully the final question on this issue, which may be because of my
ignorance:
It appears that iBATIS .NET insert statement returns the generated key
as in:

<insert id="InsertOrganization" parameterClass="Organization"
resultClass="int">
	<selectKey property="Id" type="post" resultClass="int">
		SELECT LAST_INSERT_ID() AS value
	</selectKey>			
	INSERT INTO Organizations
		(Org_Code, Org_Name)
	VALUES
		(#Code#, #Name#)
</insert>

but that this is not supported in the Java version.
Is this correct, and if so, is there any intention to support it in
future?
Regards Chris

On 18/04/2008, Brandon Goodin <brandon.goodin@gmail.com> wrote:
> What is your overall plan for deployment. Do you have sql scripts that
get
> run against the target database to build the tables and such? How will
you
> configure the connection url? What i've done in the past is to simply
have a
> property file that contains the select key sql in it. I pass this
property
> file in when my sqlmap is loaded and use the ${selectQuery} notation
in my
> sqlmap.
>
> Brandon

Mime
View raw message