You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Michael Duffy <du...@yahoo.com> on 2003/05/02 22:31:11 UTC
Where Do Stored Procedures Fit Into An O/R Mapping Layer?
I'd appreciate any and all comments on this question.
I've often wondered where stored procedures should fit
in an object-oriented application.
They're terrific for performance, and they can be a
great interface between the object and relational
layers. Folks who approach problems from a data
modeling slant are usually enthusiastic about them.
But I've seen them terribly abused. The object bigot
in me worries about diffusing business logic - some in
objects, some in the database.
How would one use stored procedures with OJB? Thank
you - MOD
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Re: Where Do Stored Procedures Fit Into An O/R Mapping Layer?
Posted by Thomas Mahler <th...@web.de>.
Hi Michael,
In some commercial O/R tools like TopLink you have direct support for
stored procedures.
But we don't have it in OJB. Stored procedures are not so popular among
o/r users for the reasons you mention. So until now there has not been
big demand for this feature.
If you really need stored procedures you can still do it with OJB by
writing subclasses of certain components and plugin them in instead the
originals.
You will have to change the SqlGenerator to generate SQL code calling
SPs. And you will have to change the JdbcAccess component to perform
stored procedures instead of prepared statements.
I know that this has been done successfully by at least one OJB user.
I made some core components pluggable to make this step as easy as possible.
cheers,
Thomas
Michael Duffy wrote:
> I'd appreciate any and all comments on this question.
> I've often wondered where stored procedures should fit
> in an object-oriented application.
>
> They're terrific for performance, and they can be a
> great interface between the object and relational
> layers. Folks who approach problems from a data
> modeling slant are usually enthusiastic about them.
>
> But I've seen them terribly abused. The object bigot
> in me worries about diffusing business logic - some in
> objects, some in the database.
>
> How would one use stored procedures with OJB? Thank
> you - MOD
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>