Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Primary Key Class  RSS feed

 
Vishal Saxena
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello All,
I can't grasp the concept of Primary Key Class approach.
Why was it designed? Why not, just mark the bean fields as primary(that would cover composite PK's too) ?
Ed Roman in Mastering EJB 2.0 says, that using Primary Key Class should be preferred, as it isolates me, from the changes to, how I would like data to be uniquely identified in the underlying storage. It's then easier for me to do the change without breaking code.
Thanks. Regards.
 
Sami Casab
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used websphere and i need to create a class thats wrap my primmary key because if dont do this simply it doesnt work. Im now using Borland Enterprise Server 5.2 and it dont force me to create a wrap class, i can directly map to a field.
In my point of view in some cases this wrap class is overwork.
Sami
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!