-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: "last changed by“-property
PostPosted: Fri Mar 14, 2008 7:45 am 
Newbie

Joined: Fri Mar 14, 2008 4:20 am
Posts: 17
Hello everyone!

I try to implement an event handler which sets a „last changed by“-property on my entities. I tried to do this by implementing a PreUpdateEventListener, which doesn’t seem to work for me. I think I am missing something.

My event listener looks like the following code and is configured in the hibernate.cfg.xml.

Code:
   public boolean onPreUpdate( PreUpdateEvent arg0 ) {
   
      AbstractEntity e = (AbstractEntity)arg0.getEntity();
   
      e.setUsernameLastChange( "TEST" );
   
      return false;
   }


Can someone please point me in the right direction how to implement such a listener? Thank you very much!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.