Could I use an <update> statement using a parameterMap and a
parameterClass ? How to use a parameterClass property?
Example:
<update id="update1" parameterMap="personMap" parameterClass="Person">
UPDATE Person SET name=?,lastname=? WHERE id = (how to reference the
value from parameter class Person here?)
</update>
Hello Alejandro,
provide an instance of Person as parameter, witch contains the values to
store.
<update id="update1" parameterClass="Person">
UPDATE Person SET
name = #name:VARCHAR#,
lastname = #lastname:VARCHAR#
WHERE id = #id:INTEGER#
</update>
Or put the name, lastname and id in the map with keys "name", "lastname"
and "id".
<update id="update1" parameterClass="map">
UPDATE Person SET
name = #name:VARCHAR#,
lastname = #lastname:VARCHAR#
WHERE id = #id:INTEGER#
</update>
You don't need the parameterMap attribute.
Ingmar