You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by "Gelhar, Wallace Joseph" <GE...@uwec.edu> on 2004/03/31 16:27:41 UTC
RE: Foreign key lookups
Hi Laurie,
There was a discussion of adding support for this type of thing about a
year ago. The debate came when discussing adding support for more than
simply "=". For example, when I create a query such as:
query.create("select all from " + Team.class.getName() + " where player
> $1");
What is the correct behavior?
I think it may be time to revisit this request, if only to support
equals on an object.
~~~~~~~~~~~~~~~~~~~~~~~
Wallace J Gelhar
University of Wisconsin - Eau Claire
Facilities Planning & Management
Computer Information Systems
715-836-3411
-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Laurie Harper
Sent: Tuesday, March 30, 2004 11:29 PM
To: ojb-user@db.apache.org
Subject: Foreign key lookups
I never did get a conclusive answer on this, so I'm reposting with more
background.
What I was hoping to be able to do is something like this:
Player p = getPlayer();
OQLQuery query = odmg.newQuery();
query.create("select all from " + Team.class.getName() +
" where player = $1");
query.bind(p);
query.execute();
Unfortunately, that results in an error because Player is not
serializable. If I modify the code like this everything is fine:
query.create("select all from " + Team.class.getName() +
" where PLAYER_ID = $1");
query.bind(new Integer(p.getID());
The only problem is that the ID property on Player is set up using
anonymous access... I want to minimize the number of database artifacts
I add into my object model and, since the integer PK columns in the
database exist for join performance rather than semantic relevance to
the object model, they're something I'd rather not expose through the
java APIs.
So, my first question is should what I tried first work? OJB has the
information it needs to implement support for this (from the repository
descriptor) but is it outside the ODMG specification?
Second question is, if I can't do what I first tried, can I use
OJB-specific APIs to work around the OQL limitation? This is more for
interest, since if I have a choice between 'cluttering' my object model
and breaking compliance with ODMG, I'll choose the former. I just want
to know if those really are my only choices...
L.
---------------------------------------------------------------------
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-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: Any one using PostgreSQL and OJB ?
Posted by Gerhard Hipfinger <ge...@openforce.at>.
Hi,
we are using ojb with postgresql 7.4.x without any problems.
kr,
gerhard
--
openForce Information Technology GesmbH
www.openforce.com
Am Fre, den 02.04.2004 schrieb Martin I. Levi um 10:34:
> Hello people!
>
> Is there anybody using OJB on a PostgreSQL database?
>
> Please let me know.
>
>
> Greets,
>
>
> Martin Ivan Levi
>
> Universitat Politecnica de Catalunya
> Centre Tecnologic de Transferencia de Calor
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Any one using PostgreSQL and OJB ?
Posted by Brian McCallister <mc...@forthillcompany.com>.
Postgres users:
Has anyone ever gotten the master/slave replication to actually work?
-Brian
On Apr 2, 2004, at 12:15 PM, Antonio Gallardo wrote:
> Robert S. Sfeir dijo:
>> Leandro Rodrigo Saad Cruz wrote:
>>
>>> I am. no problems.
>>>
>>>
>>>
>>
>> Ditto, no issues, use it for almost all my projects unless client can
>> pay for Oracle :-)
>
> Yep. PostgreSQL is my prefered choice too, even if the client can pay
> for
> Oracle or anything else. ;-)
>
> Best Regards,
>
> Antonio Gallardo
>
>
> ---------------------------------------------------------------------
> 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
Re: Any one using PostgreSQL and OJB ?
Posted by Antonio Gallardo <ag...@agssa.net>.
Robert S. Sfeir dijo:
> Leandro Rodrigo Saad Cruz wrote:
>
>>I am. no problems.
>>
>>
>>
>
> Ditto, no issues, use it for almost all my projects unless client can
> pay for Oracle :-)
Yep. PostgreSQL is my prefered choice too, even if the client can pay for
Oracle or anything else. ;-)
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Any one using PostgreSQL and OJB ?
Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
Leandro Rodrigo Saad Cruz wrote:
>I am. no problems.
>
>
>
Ditto, no issues, use it for almost all my projects unless client can
pay for Oracle :-)
R
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Any one using PostgreSQL and OJB ?
Posted by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br>.
I am. no problems.
On Fri, 2004-04-02 at 05:34, Martin I. Levi wrote:
> Hello people!
>
> Is there anybody using OJB on a PostgreSQL database?
>
> Please let me know.
>
>
> Greets,
>
>
> Martin Ivan Levi
>
> Universitat Politecnica de Catalunya
> Centre Tecnologic de Transferencia de Calor
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
--
Leandro Rodrigo Saad Cruz
InterBusiness Tecnologia e Serviços
IB - www.ibnetwork.com.br
DB - www.digitalbrand.com.br
OJB - db.apache.org/ojb
XINGU - xingu.sf.net
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Any one using PostgreSQL and OJB ?
Posted by Clay Mitchell <cl...@pfd.net>.
I am for about 3 projects.
-Clay
Martin I. Levi wrote:
> Hello people!
>
> Is there anybody using OJB on a PostgreSQL database?
>
> Please let me know.
>
>
> Greets,
>
>
> Martin Ivan Levi
>
> Universitat Politecnica de Catalunya
> Centre Tecnologic de Transferencia de Calor
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
Re: Any one using PostgreSQL and OJB ?
Posted by Brian McCallister <mc...@forthillcompany.com>.
Yep, almost exclusively.
-Brian
On Apr 2, 2004, at 4:01 AM, Andreas Bohnert wrote:
> yes, we do.
> no problems so far...
>
> regards
> andreas
>
> Martin I. Levi wrote:
>
>> Hello people!
>>
>> Is there anybody using OJB on a PostgreSQL database?
>>
>> Please let me know.
>>
>>
>> Greets,
>>
>>
>> Martin Ivan Levi
>>
>> Universitat Politecnica de Catalunya
>> Centre Tecnologic de Transferencia de Calor
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Any one using PostgreSQL and OJB ?
Posted by Andreas Bohnert <ab...@online.de>.
yes, we do.
no problems so far...
regards
andreas
Martin I. Levi wrote:
>Hello people!
>
>Is there anybody using OJB on a PostgreSQL database?
>
>Please let me know.
>
>
>Greets,
>
>
>Martin Ivan Levi
>
>Universitat Politecnica de Catalunya
>Centre Tecnologic de Transferencia de Calor
>
>
>
>
>
>
>---------------------------------------------------------------------
>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
Any one using PostgreSQL and OJB ?
Posted by "Martin I. Levi" <ml...@labtie.mmt.upc.es>.
Hello people!
Is there anybody using OJB on a PostgreSQL database?
Please let me know.
Greets,
Martin Ivan Levi
Universitat Politecnica de Catalunya
Centre Tecnologic de Transferencia de Calor
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Foreign key lookups
Posted by Laurie Harper <zo...@holoweb.net>.
Ah, so this is unsupported currently. Yeah, I see the dilemma; it would
get particularly thorny if the object in the relation had a composite
primary key. I just wish I had a decent reference to OQL so I'd know
what it could do! I'm looking forward to switching to JDO when OJB 2.0
hits :-)
L.
Gelhar, Wallace Joseph wrote:
> Hi Laurie,
>
> There was a discussion of adding support for this type of thing about a
> year ago. The debate came when discussing adding support for more than
> simply "=". For example, when I create a query such as:
>
> query.create("select all from " + Team.class.getName() + " where player
>
>>$1");
>
>
> What is the correct behavior?
>
> I think it may be time to revisit this request, if only to support
> equals on an object.
>
> ~~~~~~~~~~~~~~~~~~~~~~~
> Wallace J Gelhar
>
> University of Wisconsin - Eau Claire
> Facilities Planning & Management
> Computer Information Systems
> 715-836-3411
>
>
>
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Laurie Harper
> Sent: Tuesday, March 30, 2004 11:29 PM
> To: ojb-user@db.apache.org
> Subject: Foreign key lookups
>
>
> I never did get a conclusive answer on this, so I'm reposting with more
> background.
>
> What I was hoping to be able to do is something like this:
>
> Player p = getPlayer();
> OQLQuery query = odmg.newQuery();
> query.create("select all from " + Team.class.getName() +
> " where player = $1");
> query.bind(p);
> query.execute();
>
> Unfortunately, that results in an error because Player is not
> serializable. If I modify the code like this everything is fine:
>
> query.create("select all from " + Team.class.getName() +
> " where PLAYER_ID = $1");
> query.bind(new Integer(p.getID());
>
> The only problem is that the ID property on Player is set up using
> anonymous access... I want to minimize the number of database artifacts
> I add into my object model and, since the integer PK columns in the
> database exist for join performance rather than semantic relevance to
> the object model, they're something I'd rather not expose through the
> java APIs.
>
> So, my first question is should what I tried first work? OJB has the
> information it needs to implement support for this (from the repository
> descriptor) but is it outside the ODMG specification?
>
> Second question is, if I can't do what I first tried, can I use
> OJB-specific APIs to work around the OQL limitation? This is more for
> interest, since if I have a choice between 'cluttering' my object model
> and breaking compliance with ODMG, I'll choose the former. I just want
> to know if those really are my only choices...
>
> L.
>
>
> ---------------------------------------------------------------------
> 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