• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CMP entity bean's primary key must be RMI-IIOP type?

 
Steven Gao Song
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone,

Must CMP entity bean's primary key be RMI-IIOP type?
It seems that HFejb doesn' t mention.
 
Aakash Parashar
Ranch Hand
Posts: 123
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Freind,

You are right. I hope the following extract from ejb specs will help you. All the best.

The primary key (or field or property of a composite primary key) should be one of the following types:
any Java primitive type; any primitive wrapper type; java.lang.String; java.util.Date; java.sql.Date.

In general, however, approximate numeric types (e.g., floating point types) should never be used in primary keys. Entities whose primary keys use types other than these will not be portable.

If generated primary keys are used, only integral types will be portable. If java.util.Date is used as a primary key field or property, the temporal type should be specified as DATE.

The primary key class must be serializable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic