Another advantage to writing it BMP is that you can model the props as
dependent objects within the user entity bean... For a jump start on
writing the beans you could use http://www.mousetech.com/EJBWizard.html
which is a tool that will generate BMP entity beans (sorry no dependent
objects) for you. It is built to run with Jonas but the beans that get
generated work with jBoss with minimal fuss.
-----Original Message-----
From: Scot Bellamy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 02, 2000 9:31 AM
To: jBoss
Subject: Re: [jBoss-User] CMP Entity-Bean on 2 Tables
Or, if you need to take advantage of caching in entity beans, you can simply
use BMP and create your own finder method.
Scot.
Shahar wrote:
> Hi.
> I suggest you write a method to accomplish that in one SQL query, and
> implement it as a session bean.
>
> Shahar.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Volker Graf
> Sent: Thursday, November 02, 2000 2:17 PM
> To: jBoss
> Subject: [jBoss-User] CMP Entity-Bean on 2 Tables
>
> Hi
> --
>
> Ok here's the Situation. I am having 2 tables, a User-Table and a
> UserProps-Table, containing the necessary User-Information.
> In this case I have 2 different CMP-EJBs. The problem right now is, that
> I want to find something like
> the user(s) on which's Prop1=x and Prop2=y.
>
> User UserProps
> ==== =========
> ID <--------- UID
> Name Prop1
> Prop2
> Prop3
>
> Ok well I can try instantiating all UserProps then check for all the
> Beans where Prop1=x and Prop2=y and use again the Finder-Method, finding
> the corresponting beans, but this would suck pretty much ..
> Any Ideas for a more efficicient way ??
>
> Well as SQL-Query the optimum could look something like
> > select * from User, UserProps where UserProps.UID=User.ID and Prop1=x >
> and Prop2=y
>
> dipl. inform. Volker Graf
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]