ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Volkmann <m...@ociweb.com>
Subject Postgres and generated keys
Date Tue, 20 Mar 2007 16:25:56 GMT
Abator generates this in an SqlMap.xml file.

   <insert id="abatorgenerated_insert"  
parameterClass="com.savealot.xademo.model.Address" >
       WARNING - This element is automatically generated by Abator  
for iBATIS, do not modify.
       This element was generated on Tue Mar 20 11:15:50 CDT 2007.
     insert into sal.address (street, city, state, zip)
     values (#street:VARCHAR#, #city:VARCHAR#, #state:VARCHAR#,  
     <selectKey resultClass="java.lang.Integer" keyProperty="id" >

When I attempt an insert that uses this, it chokes on "Postgres"  
inside the selectKey element.

Perhaps I'm doing something wrong in my AbatorConfig.xml. Here's the  
part that pertains to the address table.

     <table schema="sal"
       tableName="address" domainObjectName="Address">
       <generatedKey column="id" sqlStatement="Postgres"  

Is the value for the sqlStatement attribute wrong?

View raw message