• Post Reply Bookmark Topic Watch Topic
  • New Topic

primary key class  RSS feed

 
trupti nigam
Ranch Hand
Posts: 640
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I have written a cmp bean whose primary key is of type int.
when i say getPrimaryKey() i get same primarykey for all the records.
i.e. if i have created 5 records with primary key as 0,1,2,3,4 when i say getPrimaryKey() wvwrytime i get 0.
i don't undrestand what is the problem..
please somedody help me..
thanks,
trupti
 
anup vachali
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trupti,
Is ur getPrimaryKey() method supposed to get one record or a list of primary keys? If it is one record use ejb's findByPrimaryKey() and if it is a list make sure ur method is returning either an Enumeration or a Collection of remote objects.
HTH,
Anup.
[This message has been edited by anup vachali (edited September 06, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!