This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes need help here Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply locked New topic
Author

need help here

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

I have two entity beans: PlayerBean and TeamBean.
the realtionship between these beans is : one to many (many players to one team).
I am using CMP 2.0 model and the relationship is bidirectional.
the fields of Team table in the database are :
teamname, teamcity
the fields of Player table in the database are:
pid, pname, psalary, pteam (pteam is a string and it serves as a FK).
in the PlayerLocal interface I wrote :
All the codes are inspired from Mastering EJB

in the PlayerBean I wrote:

using J2EE RI, I don't persist the pteam..
are there any things wrong with this design ?
if there is a better way to perform this relationship please tell me.
if I wrote in my client:
player.setTeam(teamloca);
will the container fills the pteam field in the Player table with the right value ?
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
Redirect to the twin thread in "EJB and Other J2EE Technologies". Please, post your answers there. Thanks...


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help here
 
Similar Threads
Confused a little, alot
Problem with accessing a CMR field, SOS
need help with CMR
Need explaination
unable to access cmr field