This is now done ;)
The next step will be for me to add support for callable="true" which will enable us to seamingly have Stored Procedure/function support
(with some small restrictions).
e.g.
<join table="partyjointable">
<sql-insert callable="true">{ call createJoinTable(?, ?, ?) }</sql-insert> <sql-update callable="true">{ ? = call updateJoinTable(?, ?, ?) }</sql-update> <!-- xname, address, partyid -->
<sql-delete callable="true">{ ? = call deleteJoinTable(?) }</sql-delete> <!-- partyid -->
<key column="partyid"/>
<property name="name" column="xname" type="string"/>
<property name="address" type="string"/>
</join>
where the simplest corresponding stored procedure/functions on oracle is:
CREATE OR REPLACE PROCEDURE createJoinTable (
xname IN VARCHAR2,
address IN VARCHAR2,
partyId IN VARCHAR2
) AS
dbg_msg VARCHAR2(32);
BEGIN
INSERT INTO partyjointable (xname, address, partyid) values (xname, address, partyId);
END createJoinTable;
/
CREATE OR REPLACE FUNCTION updateJoinTable (
qxname IN VARCHAR2,
qaddress IN VARCHAR2,
qpartyid IN VARCHAR2
) RETURN NUMBER IS
BEGIN
update partyjointable set xname=qxname, address=qaddress where partyid=qpartyid;
return SQL%ROWCOUNT;
END updateJoinTable;
/
CREATE OR REPLACE FUNCTION deleteJoinTable (
uid IN VARCHAR2
) RETURN NUMBER IS
BEGIN
delete partyjointable
where partyid = uid;
return SQL%ROWCOUNT;
END deleteJoinTable;
/
Note the return SQL%ROWCOUNT; which is required to inform hibernate that the stored procedure has done what was expected ;)
Hope ya' like ;) /max
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel