aspose file tools
The moose likes EJB and Other Java EE Technologies and the fly likes Entity beans and primary keys Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "Entity beans and primary keys" Watch "Entity beans and primary keys" New topic
Author

Entity beans and primary keys

Manjunath Subramanian
Ranch Hand

Joined: Jul 18, 2001
Posts: 236

Hi Everyone,
Can i map Entity Beans(BMP)on tables which don't have primary keys?
Tables without PK'S sounds non sense.But is it possible?
Thanks,
Manjunath
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

The EJB Primary key has no actual connection with database keys - it's merely an object that uniquely defines a bean instance. It's common to use a database primary key field, since by definition that ALSO is valid, but there's no absolute requirement. I had a fairly extensive project where there WAS no single database field that uniquely defined a table row, but by combining 2 columns to make the EJB primary key I could map 1 bean to one row.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
 
 
subject: Entity beans and primary keys
 
Threads others viewed
isIdentical() method
Design of EJB in UML of Rational rose 2000
UNKNOWN Primary Key
Entity Beans Many-Many relationship
I need a bit of explanation about bidirectional relation between two entity beans.
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture