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 Jim Moore <ji...@veritas.com> on 2003/08/01 17:13:57 UTC

RE: Query a non navigable path

Do you have anything that would connect them?  What does your database
definition look like for those tables?


-----Original Message-----
From: Sebastien Cesbron [mailto:sebastien.cesbron@laposte.net] 
Sent: Friday, August 01, 2003 1:07 PM
To: ojb-user@db.apache.org
Subject: Query a non navigable path


Hi,

I'am always on the way of integrating ojb in my project. It works very 
well but I am in front of a problem I can't solve.
I have for example this classes :
Class Email
{
private User sender;
private User receiver;
}
Class User
{
// No link to the * emails I sent or received
}

I am using the PB-API an I want to retrieve a liste of all users that 
were receivers of email I sents. How can I do that ?
As queries are based on path expressions and I don't have path from 
receiver I don't know how to do such a query

Thanks in advance for any help

Seb

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


Re: Query a non navigable path

Posted by Sebastien Cesbron <se...@laposte.net>.
The connexion is that my email have one sender and one receiver.
For this example, the database looks like

create table EMAIL
(
   ID          integer not null,
   SENDER_ID   integer not null,
   RECEIVER_ID integer not null,
   primary key (ID),
   foreign key (SENDER_ID)   references USER(ID),
   foreign key (RECEIVER_ID) references USER(ID)
);

create table USER
(
   ID integer not null,
   primary key (ID)
);

Seb

PS : Sorry if there is syntax erros, I can't cut and paste my sql

Jim Moore wrote:
> Do you have anything that would connect them?  What does your database
> definition look like for those tables?
> 
> 
> -----Original Message-----
> From: Sebastien Cesbron [mailto:sebastien.cesbron@laposte.net] 
> Sent: Friday, August 01, 2003 1:07 PM
> To: ojb-user@db.apache.org
> Subject: Query a non navigable path
> 
> 
> Hi,
> 
> I'am always on the way of integrating ojb in my project. It works very 
> well but I am in front of a problem I can't solve.
> I have for example this classes :
> Class Email
> {
> private User sender;
> private User receiver;
> }
> Class User
> {
> // No link to the * emails I sent or received
> }
> 
> I am using the PB-API an I want to retrieve a liste of all users that 
> were receivers of email I sents. How can I do that ?
> As queries are based on path expressions and I don't have path from 
> receiver I don't know how to do such a query
> 
> Thanks in advance for any help
> 
> Seb
> 
> ---------------------------------------------------------------------
> 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