> No my question is just like we use a join sql statement in EB is it
possible
> to write the same sql in ejb-ql also?

I'm not quite sure I understand your question then.

Picture this...  suppose I have a database schema with three tables STORY,
STORYSECTION and SECTION which represent a many to many relationship between
story and section.

to do a query in sql finding all stories for a given seciton id, you'd do
something like

SELECT * FROM story AS s LEFT JOIN storysection AS ss ON s.storyid =
ss.storyid WHERE ss.sectionid = ?

in ejb-ql, you would do this:

SELECT OBJECT(s) FROM Story AS s, IN (s.storySections) ss WHERE ss.section =
?1

the subtle difference being that the parameter to the first query is the
sectionid, but in the second its the section local interface.

does that explain it?

hth
dim

>
> ??Ramesh Kesavanarayanan
>  ?    [EMAIL PROTECTED]
>
>
>  -----Original Message-----
> From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 30, 2002 2:47 PM
> To: Kesavanarayanan, Ramesh (Cognizant); [EMAIL PROTECTED]
> Subject: Re: doubt in ejb-ql
>
> yes, you simply reference another bean.
>
>
> ----- Original Message -----
> From: "Kesavanarayanan, Ramesh (Cognizant)" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, August 30, 2002 6:54 PM
> Subject: doubt in ejb-ql
>
>
> > Hi all,
> >
> >  Is it possible to make a join in ejb-ql?
> >
> >
> > * Ramesh Kesavanarayanan
> >  *    [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> >
> >
> >
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to