Hi!
Using cayenne 3.0.1 with Oracle 10g DB, I discovered a problem with stored
procedures.
First I used the modeller to reengineer existing stored procedures.
It created this mapping:
<procedure name="PROC_1" schema="SCH" catalog="PKG1">
(parameters omitted)
When calling the procedure from Java code like this:
ProcedureQuery q = new ProcedureQuery("PROC_1");
q.addParameter("PAR1", "value1");
// parameters...
context.performQuery(q);
This makes this SQL call:
{call SCH.PROC_1(?, ?, ?, ?)}
Which is wrong. The DB returns:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SCH.PROC_1' must be declared
The correct call would be:
{call SCH.PKG1.PROC_1(?, ?, ?, ?)}
At least this is what works when run directly (JDBC or sql tool from
Oracle: SqlPlus)
Regards,
David
David Balažic
Software Engineer
ComTrade
Litijska 51, 1000 Ljubljana
Slovenia
phone: +386 81 60 8937
fax: +386 1 586 52 70
www.comtrade.com