For each class/collection you have: loader, 
sql-insert, sql-update, sql-delete

<class name="Person" table="PERSON">
<id name="Id" unsaved-value="0" column="PERID">
<generator class="increment"/>
</id>
<property name="Name" not-null="true" column="NAME"/>
<loader query-ref="person"/>
<sql-insert>INSERT INTO PERSON (NAME, PERID) VALUES ( UPPER(?), ? 
)</sql-insert>
<sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE PERID=?</sql-update>
<sql-delete>DELETE FROM PERSON WHERE PERID=?</sql-delete>
</class>

<sql-query name="person">
<return alias="p" class="Person" lock-mode="upgrade"/>
SELECT NAME AS {p.Name}, PERID AS {p.Id} FROM PERSON WHERE PERID=? FOR 
UPDATE
</sql-query>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/DQbO2BPfZ6gJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to