Hi,

Well, the example in the doco is like this:

<finder>
            <name>findByProvinceAndType</name>
            <query>,CreatureEJBTable 
            WHERE CreatureEJBTable.id = PopulationEJBTable.creatureId AND
            provinceId={0} AND type={1}</query>
            <order></order>
        </finder>

I think I did this too, once, although I can't find the example now.

david jencks

On 2001.06.07 14:34:45 -0400 John Moore wrote:
> 
> if you use a join you have to make sure that it is handled in a subselect
> since, I don't believe, you can modify the from clause in EJB 1.1 CMP. 
> Here
> is an example of an where we join between two tables. 
> 
> <finder>
>       <name>findExternalOrganizations</name>
>       <query>account_no_in = {0} and ounit_parent_no_in is null and
> ounit_no_in != ( select ounit_no_in from account_tbl where account_no_in
> =
> {0} )</query>
>       <order />
> </finder>
> 
> -----Original Message-----
> From: Grim Shieldsson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 10:06 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Problem with Custom finders ....
> 
> 
> No I didn't, under Bean Managed Persistence.  You do under CMP.
> --- Ray <[EMAIL PROTECTED]> wrote:
> > Hi again .... :-)
> > 
> > Still working on my problem with customer finders
> > 
> > Has anyone got an example of a cusotmer finder that
> > uses SQL joins? This appears to be my problem.
> > 
> > Did you have to define entity beans for the
> > intermediate tables?
> > 
> > Any examples would be much appreciated .... :-)
> > 
> > 
> > 
> > 
> > ____________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> > or your free @yahoo.ie address at http://mail.yahoo.ie
> > 
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> =====
> Grim Shieldsson (James A Barrows)
> Acting Chieftain of Clan StormWolf
> Barbarian Freehold Alliance
> Oppurtunity doesn't knock.  It only presents itself after you kick down
> the
> door.
> --Kyle Chandler
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
> <TITLE>RE: [JBoss-user] Problem with Custom finders ....</TITLE>
> </HEAD>
> <BODY>
> <BR>
> 
> <P><FONT SIZE=2>if you use a join you have to make sure that it is
> handled in a subselect since, I don't believe, you can modify the from
> clause in EJB 1.1 CMP.&nbsp; Here is an example of an where we join
> between two tables. </FONT></P>
> 
> <P><FONT SIZE=2>&lt;finder&gt;</FONT>
> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
> SIZE=2>&lt;name&gt;findExternalOrganizations&lt;/name&gt;</FONT>
> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
> SIZE=2>&lt;query&gt;account_no_in = {0} and ounit_parent_no_in is null
> and ounit_no_in != ( select ounit_no_in from account_tbl where
> account_no_in = {0} )&lt;/query&gt;</FONT></P>
> 
> <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>&lt;order
> /&gt;</FONT>
> <BR><FONT SIZE=2>&lt;/finder&gt;</FONT>
> </P>
> 
> <P><FONT SIZE=2>-----Original Message-----</FONT>
> <BR><FONT SIZE=2>From: Grim Shieldsson [<A
> HREF="mailto:[EMAIL PROTECTED]";>mailto:[EMAIL PROTECTED]</A>]</FONT>
> <BR><FONT SIZE=2>Sent: Thursday, June 07, 2001 10:06 AM</FONT>
> <BR><FONT SIZE=2>To: [EMAIL PROTECTED]</FONT>
> <BR><FONT SIZE=2>Subject: Re: [JBoss-user] Problem with Custom finders
> ....</FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=2>No I didn't, under Bean Managed Persistence.&nbsp; You do
> under CMP.</FONT>
> <BR><FONT SIZE=2>--- Ray &lt;[EMAIL PROTECTED]&gt; wrote:</FONT>
> <BR><FONT SIZE=2>&gt; Hi again .... :-)</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; Still working on my problem with customer
> finders</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; Has anyone got an example of a cusotmer finder
> that</FONT>
> <BR><FONT SIZE=2>&gt; uses SQL joins? This appears to be my
> problem.</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; Did you have to define entity beans for the</FONT>
> <BR><FONT SIZE=2>&gt; intermediate tables?</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; Any examples would be much appreciated ....
> :-)</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; 
>____________________________________________________________</FONT>
> <BR><FONT SIZE=2>&gt; Do You Yahoo!?</FONT>
> <BR><FONT SIZE=2>&gt; Get your free @yahoo.co.uk address at <A
> HREF="http://mail.yahoo.co.uk"; TARGET="_blank">http://mail.yahoo.co.uk</A></FONT>
> <BR><FONT SIZE=2>&gt; or your free @yahoo.ie address at <A
> HREF="http://mail.yahoo.ie"; TARGET="_blank">http://mail.yahoo.ie</A></FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; _______________________________________________</FONT>
> <BR><FONT SIZE=2>&gt; JBoss-user mailing list</FONT>
> <BR><FONT SIZE=2>&gt; [EMAIL PROTECTED]</FONT>
> <BR><FONT SIZE=2>&gt; <A 
>HREF="http://lists.sourceforge.net/lists/listinfo/jboss-user";
> TARGET="_blank">http://lists.sourceforge.net/lists/listinfo/jboss-user</A></FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=2>=====</FONT>
> <BR><FONT SIZE=2>Grim Shieldsson (James A Barrows)</FONT>
> <BR><FONT SIZE=2>Acting Chieftain of Clan StormWolf</FONT>
> <BR><FONT SIZE=2>Barbarian Freehold Alliance</FONT>
> <BR><FONT SIZE=2>Oppurtunity doesn't knock.&nbsp; It only presents itself
> after you kick down the door.</FONT>
> <BR><FONT SIZE=2>--Kyle Chandler</FONT>
> </P>
> 
> <P><FONT SIZE=2>__________________________________________________</FONT>
> <BR><FONT SIZE=2>Do You Yahoo!?</FONT>
> <BR><FONT SIZE=2>Get personalized email addresses from Yahoo! Mail - only
> $35 </FONT>
> <BR><FONT SIZE=2>a year!&nbsp; <A HREF="http://personal.mail.yahoo.com/";
> TARGET="_blank">http://personal.mail.yahoo.com/</A></FONT>
> </P>
> 
> <P><FONT SIZE=2>_______________________________________________</FONT>
> <BR><FONT SIZE=2>JBoss-user mailing list</FONT>
> <BR><FONT SIZE=2>[EMAIL PROTECTED]</FONT>
> <BR><FONT SIZE=2><A HREF="http://lists.sourceforge.net/lists/listinfo/jboss-user";
> TARGET="_blank">http://lists.sourceforge.net/lists/listinfo/jboss-user</A></FONT>
> </P>
> 
> </BODY>
> </HTML>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to