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 ma...@pi.ingv.it on 2006/10/04 14:52:43 UTC
Please help for a beginner
Dear all,
I have just come to OJB, and it was my intention to use ODMG.
Is there any tutorial?
I would like to retrieve a collection of objects from a relational
database (Postgres), making a selection using non standard database
functions (postgis extension).
I was wondering:
1) if this is possible with ODMG?
2) if the above is possible, then what is the configuration I should make
up, and what the query should look like?
Thank you,
Francesco.
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Please help for a beginner
Posted by Armin Waibel <ar...@apache.org>.
Hi Francesco,
martinelli@pi.ingv.it wrote:
> Dear all,
> I have just come to OJB, and it was my intention to use ODMG.
> Is there any tutorial?
>
A simple odmg tutorial can be found in 'tutorial'-section
http://db.apache.org/ojb/docu/tutorials/odmg-tutorial.html
> I would like to retrieve a collection of objects from a relational
> database (Postgres), making a selection using non standard database
> functions (postgis extension).
> I was wondering:
> 1) if this is possible with ODMG?
No, this is not supported. To use specific sql-extension or functions
you have to use plain SQL. It's possible to use plain SQL within the
odmg-api using the underlying PB-api
http://db.apache.org/ojb/docu/guides/odmg-guide.html#Access+the+PB-api+within+ODMG
http://db.apache.org/ojb/docu/faq.html#performSQL
But why do you want to use OJB to read the data? It seems that the
PostGIS jdbc extension can return java geometry objects
http://postgis.refractions.net/docs/ch04.html#id2453247
regards,
Armin
> 2) if the above is possible, then what is the configuration I should make
> up, and what the query should look like?
>
> Thank you,
> Francesco.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org