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]

Reply via email to