• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

findByPrimaryKey question from HF

 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
On page 342, the parameter to findByPrimaryKey is a String. Isn't it the case that it should be the primary key class instead, which often is a String, but not always?
 
Goan Balchao
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keith,
The findByPrimaryKey(primaryKey) in the Home interface would take a parameter that is the same type as the primary key type class that is declared in the D.D
So if the primary key class type is String, it would take a String as an argument. If it is a composite type, it would take that type as the argument.
Hope that helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic