Re: Please help for a beginner

Armin Waibel <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi Francesco,

[email protected] 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: [email protected]
> For additional commands, e-mail: [email protected]
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.