Re: Timestamp ignored
Thank you, but i figure this out. I had @ID tag on multiple fields, so all but the first @ID were being ignored. Its all working now. I dont know how to remove this thread since it seems like i posted it in the wrong forum. -- View this message in context: http://www.nabble.com/Timestamp-ignored-tp18205416p18210030.html Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Timestamp ignored
Hi Julia, OpenEJB is an EJB implementation itself, like JBoss. If you're willing to give OpenEJB a try we can definitely see if we can help you get your code running. -David On Jun 30, 2008, at 3:06 PM, Julia O wrote: Hi, I am using jboss 4.2.0 GA and MySQL 5.0. And cannot get a timestamp to persist to the database. I have an @Entity bean with 3 fields: boolean, int. and java.sql.Timestamp. Everything persists except for the timestamp. In fact, i added some trace statements and the getter method for my timestamp is never being accessed. Here is what my getter looks like: @Id @Temporal(TemporalType.TIMESTAMP) @Column(name="report_timestamp") public Timestamp getReportTimestamp() { m_log_.info("RETURNING TIMESTAMP " + m_reportTimetamp); return m_reportTimetamp; } The field maps to a column in mysql database called report_timestamp of type DATETIME. I also used TIMESTAMP without any progress. The persistance manager keeps inserting nulls into that column. Additionally, i tried the following mysql drivers in my jboss configuration: mysql-connector-java-5.0.8-bin.jar and mysql-connector-java-5.1.6- bin.jar. Any help would be greatly appreciated. -- View this message in context: http://www.nabble.com/Timestamp-ignored-tp18205416p18205416.html Sent from the OpenEJB User mailing list archive at Nabble.com.
Timestamp ignored
Hi, I am using jboss 4.2.0 GA and MySQL 5.0. And cannot get a timestamp to persist to the database. I have an @Entity bean with 3 fields: boolean, int. and java.sql.Timestamp. Everything persists except for the timestamp. In fact, i added some trace statements and the getter method for my timestamp is never being accessed. Here is what my getter looks like: @Id @Temporal(TemporalType.TIMESTAMP) @Column(name="report_timestamp") public Timestamp getReportTimestamp() { m_log_.info("RETURNING TIMESTAMP " + m_reportTimetamp); return m_reportTimetamp; } The field maps to a column in mysql database called report_timestamp of type DATETIME. I also used TIMESTAMP without any progress. The persistance manager keeps inserting nulls into that column. Additionally, i tried the following mysql drivers in my jboss configuration: mysql-connector-java-5.0.8-bin.jar and mysql-connector-java-5.1.6-bin.jar. Any help would be greatly appreciated. -- View this message in context: http://www.nabble.com/Timestamp-ignored-tp18205416p18205416.html Sent from the OpenEJB User mailing list archive at Nabble.com.