2 May 2005 16:38
SPs and OJB-22, Re: OJB 1.0 to 1.1 Migration Experience
Vadim Gritsenko <vadim <at> reverycodes.com>
2005-05-02 14:38:25 GMT
2005-05-02 14:38:25 GMT
Jakob Braeuchi wrote:
> hi vadim,
Hi Jacob,
> thanks for the feedback. i think we should add this to a 'migration howto'.
Yes, feel free to add it wherever :)
> btw. i commited a patch optimize the select when querying for proxies.
> it selects the pks only. the patch does not yet support stored
> procedures, actually i do not know if it should ?
There are situations when an application has no "direct" access to the database
(no SELECT / UPDATE / INSERT / DELETE statements allowed), and it can use only
stored procedures for data access. In order to be able to use OJB in such
situations, OJB should always use stored procedure calls. For example,
currently, if stored procedure for retrieval by fk is set, batch retrieval is
turned off (because it uses SELECT ... WHERE ID IN (1, 2, ...) statement which
is not trivial to do with stored procedures). So at the cost of some slowdown,
it's possible to use OJB when "direct" database access is not allowed.
> could you please have a look at
> SqlGeneratorDefaultImpl#getPreparedSelectPkStatement
I can suggest two ways of making it work with stored procedures:
* Use selectByPkStatement if stored procedure is configured,
similar to getPreparedSelectStatement:
(Continue reading)
RSS Feed