This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Is it possible to create a CMP Entity Bean for an existing table which does not have a primary key. In other words can we have a CMP Entity Bean which does not have a Primary Key class. If it is possible then what should the ejbCreate method of the Entity Bean Class return. However, I was able to create and deploy in Weblogic 8.1 a CMP Entity Bean for an existing table which had a primary key. And in this case the return type of ejbCreate method was the Primary Key Class which I had created for this Entity Bean Mainak Das firstname.lastname@example.org
Hi Mainak Well, I wonder if you don't have PK for a table what kind of data is it? If you have stored something in RDBMS then it means it is related with something in "some" way...Either its a weak entity, strong entity , foreign key relation, something...even if something is just data there has to be some sort of uniqueness right? because otherwise how would we differentiate them even by looking at "select * from .." sort of query? Please let us know why you want to have table without PK? Regards Maulin
Joined: Nov 04, 2001
I mean if you have a dependent data (via foreign key relation or something) then you would have that data in some other Entity bean as a entity member rather than entity bean on its own... Regards Maulin