How do I map a Date/Time field to an Oracle database with CMP?

Shaun Childers

[Question continues: (I have written a wrapper class with the help of java.util.GregorianCalendar but it doesn't store time in Oracle database, whereas it stores Date without any problem.)]

Use the java.sql.Timestamp field to store your Date/Time in your entity bean, and then declare the corresponding field as 'Date' type in the Oracle database and it will work fine. You will have the "date" value and the "time" value preserved.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact