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#, #zip:INTEGER#)
    <selectKey resultClass="java.lang.Integer" keyProperty="id" >
      Postgres
    </selectKey>
  </insert>

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" identity="true"/>
    </table>

Is the value for the sqlStatement attribute wrong?

Reply via email to