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 Luc Fouin <lu...@aptiwan.com> on 2005/08/11 12:40:25 UTC

Getting the datasource of the mapping...

hi all,

i've got a mapping with a set of objects. i've also got in the same 
database datas which are not mapped to an object (because they are just 
here for analysis and d'ont need to be instanciated...)

my goal is to query the database using a SQL Query. I can't use OQL 
(QueryByCriteria or QueryBySql) because there's no mapping on those datas.

First i tried a method which could take my query, and i did not found that.
So my second point is to try to get the datasource corresponding to the 
mapping (to avoid redundancy of the parameters) and to pass my query by 
classic jdbc...

is this possible to get a datasource from the persistenceborker??

(I see a third solution by setting a jndi datasource which will be 
called by the mapping and by me, but it seems to me a little more 
complicated...)

thanks a lot... (please tell me if i'm not clear!)

Luc

-- 
Luc FOUIN - Stagiaire Aptiwan
14 rue Niepce
75014 Paris
Tél : (+33) 6 77 95 17 24
Mél : luc*DOT*fouin*AT*aptiwan*DOT*com

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


Re: Getting the datasource of the mapping...

Posted by Luc Fouin <lu...@aptiwan.com>.
Armin Waibel a écrit :
> Hi,
> 
> please have a look at
> http://db.apache.org/ojb/docu/guides/connection.html#Can+I+directly+obtain+a%0A++++++++++++++++ 
> 
> 
> regards,
> Armin
> 

Thanks Charles & Armin, it was exactly what i was looking for...

;)

Luc

-- 
Luc FOUIN - Stagiaire Aptiwan
Mél : luc*DOT*fouin*AT*aptiwan*DOT*com

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


Re: Getting the datasource of the mapping...

Posted by Armin Waibel <ar...@apache.org>.
Hi,

please have a look at
http://db.apache.org/ojb/docu/guides/connection.html#Can+I+directly+obtain+a%0A++++++++++++++++

regards,
Armin

Luc Fouin wrote:
> hi all,
> 
> i've got a mapping with a set of objects. i've also got in the same 
> database datas which are not mapped to an object (because they are just 
> here for analysis and d'ont need to be instanciated...)
> 
> my goal is to query the database using a SQL Query. I can't use OQL 
> (QueryByCriteria or QueryBySql) because there's no mapping on those datas.
> 
> First i tried a method which could take my query, and i did not found that.
> So my second point is to try to get the datasource corresponding to the 
> mapping (to avoid redundancy of the parameters) and to pass my query by 
> classic jdbc...
> 
> is this possible to get a datasource from the persistenceborker??
> 
> (I see a third solution by setting a jndi datasource which will be 
> called by the mapping and by me, but it seems to me a little more 
> complicated...)
> 
> thanks a lot... (please tell me if i'm not clear!)
> 
> Luc
> 

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