-->
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.  [ 2 posts ] 
Author Message
 Post subject: Transient field's data in Callbacks
PostPosted: Wed Jan 11, 2006 11:12 am 
Newbie

Joined: Thu Oct 20, 2005 4:15 am
Posts: 8
Hibernate version: 3.1 final

is it supposed not to have access to actual values of transient fields in event callbacks e.g. @PrePersist???

I have
Code:
    @Transient
    public ModificationType getModificationType() {
        return modificationType;
    }


where ModificationType of 5 values.

on @PrePersist
I would like to calculate isDeleted flag based on getModificationType(). But I can not do this because i get default value for getModificationType field, NOT the actual one...

Thanx in advance!


Top
 Profile  
 
 Post subject: i want to to do the same thing
PostPosted: Sat Feb 09, 2008 12:54 am 
Newbie

Joined: Sat Feb 09, 2008 12:37 am
Posts: 2
I am needing to do that same thing shown above. @Transient annotated properties are not available from EntityListener callback methods. Specifically @PrePersist and @PostPersist in my case.

Why is it this way? Is there a workaround?


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

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.