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.  [ 3 posts ] 
Author Message
 Post subject: Can i get all dirty attributes ?
PostPosted: Fri Dec 14, 2007 2:24 pm 
Newbie

Joined: Fri Dec 14, 2007 2:11 pm
Posts: 1
Hibernate version: 3.2.5.ga

I would like to know if there's a way to get all "dirty" attributes ?
I've seen the method session.isDirty(), but this method returns only if anything is dirty, but i don't know what is dirty.
I've seen the interceptor too. But to use interceptors, i would have to call a save method or something like this.

I'd like something like this:
???? = AnyHelperClass.getAllDirtyAttributes(entityObject).
or
???? = new AnyHelperClass().getAllDirtyAttributes(entityObject).

Thanks in advance.


Top
 Profile  
 
 Post subject: I'd like to know the same thing
PostPosted: Mon Jan 07, 2008 8:35 pm 
Newbie

Joined: Mon Jan 07, 2008 8:09 pm
Posts: 1
Location: Irvine, Ca
This seems like such a basic question, but I also have not been able to figure this out. If anyone has an answer I'd love to hear it.


Top
 Profile  
 
 Post subject: Dirty attributes
PostPosted: Thu Feb 14, 2008 8:55 am 
Newbie

Joined: Tue Feb 05, 2008 4:20 am
Posts: 1
Location: Belgium
Looks like you need int[] findDirty(...) in Interceptor. The returned value is an array with indices of dirty attributes. Can be linked to String[] propertyNames to get the names of dirty attributes.

Wouter


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.