File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Entity Beans +BMP Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Entity Beans +BMP Doubt" Watch "Entity Beans +BMP Doubt" New topic
Author

Entity Beans +BMP Doubt

satheesh krishnaswamy
Ranch Hand

Joined: Mar 17, 2004
Posts: 137
Hi
Suppose if I have two Tables and I want to Write only one Entity Beans.I want to use Bean Managed Persistence.How do I do this.I am asking this doubt because the getPrimaryKey(),ejbCreate() methods cannot return primary keys for two tables,Right.
Can anyone help me in this regard.
Thanks in advance
With kind Regards
Satheesh.K


Regards,<br /> <br />Satheesh.K<br />-------------<br />SCJP 1.4<br />SCWCD 1.4
sawan parihar
Ranch Hand

Joined: Aug 24, 2004
Posts: 250
Hello satheesh ,
Suppose if I have two Tables and I want to Write only one Entity Beans


Why. Just curious to know the reason. Is it because you want to do some rnd.

Entity beans represent a row in the database. One entity. If you have two tables each having its own primary key then we are talking about two entities and each entity should be represented by a different entity bean instance.

Hope it helps.


Sawan<br />SCJP,SCWCD,SCBCD<br /> <br />Every exit is an entry somewhere.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Entity Beans +BMP Doubt