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. Here is an example of an where we join
> between two tables. </FONT></P>
>
> <P><FONT SIZE=2><finder></FONT>
> <BR> <FONT
> SIZE=2><name>findExternalOrganizations</name></FONT>
> <BR> <FONT
> SIZE=2><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></FONT></P>
>
> <P> <FONT SIZE=2><order
> /></FONT>
> <BR><FONT SIZE=2></finder></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. You do
> under CMP.</FONT>
> <BR><FONT SIZE=2>--- Ray <[EMAIL PROTECTED]> wrote:</FONT>
> <BR><FONT SIZE=2>> Hi again .... :-)</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Still working on my problem with customer
> finders</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Has anyone got an example of a cusotmer finder
> that</FONT>
> <BR><FONT SIZE=2>> uses SQL joins? This appears to be my
> problem.</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Did you have to define entity beans for the</FONT>
> <BR><FONT SIZE=2>> intermediate tables?</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Any examples would be much appreciated ....
> :-)</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>>
>____________________________________________________________</FONT>
> <BR><FONT SIZE=2>> Do You Yahoo!?</FONT>
> <BR><FONT SIZE=2>> 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>> 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>> </FONT>
> <BR><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>
> <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. 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! <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