db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OJB-16) Support stored procedures in select by pk statement
Date Mon, 25 Apr 2005 21:04:25 GMT
     [ http://issues.apache.org/jira/browse/OJB-16?page=comments#action_63701 ]
     
Vadim Gritsenko commented on OJB-16:
------------------------------------

Thanks for applying the patch. I did some testing and OJB still works Ok - goes over stored
procedures as configured.

Any chance of applying the patch to 1.0? It seems 1.1 has some significant changes, I'm wary
of using in in the production project (yet).

Thanks,
Vadim


> Support stored procedures in select by pk statement
> ---------------------------------------------------
>
>          Key: OJB-16
>          URL: http://issues.apache.org/jira/browse/OJB-16
>      Project: OJB
>         Type: New Feature
>   Components: PB-API
>     Versions: 1.0.x CVS
>     Reporter: Vadim Gritsenko
>     Assignee: Thomas Dudziak
>  Attachments: QueryByCriteriaBase.java, QueryByFKCriteria.java, SelectByFKProcedureDescriptor.java,
SelectByPKProcedureDescriptor.java, SqlProcedureFKStatement.java, db-ojb-patch.diff, db-ojb-selectbypk.diff,
stored-procedures-patch.zip, xdoclet.diff
>
> This patch adds support for retrieving objects by primary keys through call to stored
procedure instead of using select statement.
> To activate the feature, add xdoclet tag to the class:
> /**
>  * @ojb.class table="MYBEAN"
>  * @ojb.selectbypk-procedure name="FIND_MYBEAN_BYID"
>  */
> public class MyBean {
>     /**
>      * @ojb.field primarykey="true"
>      */
>     Integer id;
> }
> And then, create stored procedure:
> CREATE OR REPLACE PACKAGE TYPES AS
>   TYPE CURSORTYPE IS REF CURSOR;
> END TYPES;
> /
> CREATE OR REPLACE FUNCTION FIND_MYBEAN_BYID (ANID IN MYBEAN.ID%TYPE)
> RETURN TYPES.CURSORTYPE AS
> RESULT TYPES.CURSORTYPE;
> BEGIN
>   OPEN RESULT FOR SELECT * FROM MYBEAN WHERE ID = ANID;
>   RETURN RESULT;
> END;
> /
> Patch is made against OJB_1_0_RELEASE branch.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message