From: Mintyeye <nu...@jb...> - 2005-07-29 11:14:09
|
I make Entity Class "MyClass" | @Entity(access = AccessType.FIELD) | public class MyClass implements Serialize { | ... | Date lastUpdate; | .... | @PrePersist | @PreUpdate | public void foo() { | System.out.println("Hi"); | lastUpdate = new Date(); | } | } | 1. Instantiate MyClass Object and persist it. 2. Console Result - "Hi" is printed 3. DB Result : - new Row is created but...... - "lastUpdate" column is Null I want to update "lastUpdate" column. What can I do? (T_T) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3887260#3887260 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3887260 |