the best way to generate the primary key for entity bean
Joined: Jan 14, 2002
hello i am the beginner to entity bean,and usually use the toplink as the o-r mapping tool.it can generate the unique primary key automatically for me,i don't need to worry about it. now i transfer to entity bean,i found that i must generate the pk in my code(if i use the integer id as primary key),then invoke the "create" method to insert a record to database,but how can i keep the id unique? who can introduce me the best mechanism to generate pk for the entity bean? thank you very much!