Hi,
I need your expert help in writing a simple CMP entity bean, with one
field of the primary key being autogenerated at database level.
I created a database table in DB2 with three fields, userid varchar(30)
not null, insert_time timestamp not null, amount decimal(7,2). Here the
first 2 fields are primary key. The default value for insert_time is
"current timestamp". i.e., the database itself will insert the value
when a record is inserted.
Now, my question is, how do we handle this in CMP bean? How to generate
hashcode? How to write the PK class? How do we code ejbCreate() method
in this situation?

Please donot suggest me to insert timestamp from java code, by getting
current time millis. Can anybody give sample code for this kind of bean?

Thanks in advance.

Venkat.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to