Define timestamp in hibernate.hbm.xml

659 Views Asked by At

I have a dummy table I want to map with Hibernate can you please help me to define in dummy.hbm.xml

type=timestamp, Default=CURRENT_TIMESTAMP, extra=on update CURRENT_TIMESTAMP

And which type of variable should i need to define in java class?

desc dummy;

+------------+--------------+------+-----+-------------------+-----------------------------+
| Field      | Type         | Null | Key | Default           | Extra                       |
+------------+--------------+------+-----+-------------------+-----------------------------+
| timestamp  | timestamp    | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+------------+--------------+------+-----+-------------------+-----------------------------+
0

There are 0 best solutions below