-->
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: How can I get the recent state reflected?
PostPosted: Mon Dec 17, 2007 10:45 am 
Beginner
Beginner

Joined: Tue Sep 11, 2007 5:57 am
Posts: 36
Hello I have defined a new class that implements IInterceptor:
I have used this to set the CreatedDate and ModifiedDate properties of the business entities. I create an object as

Address add = new Address();
add.City = "Xtz";
add.State = "Abcd";
add.Country = "Pqr";
_session.Save(add);

add.Line1 = "Street 1";

Individual ind = new Individual();
ind.ExternalID = 1234;
ind.Last = "LastName";
ind.Address1 = add;
_session.Save(ind);

When I created an object of Address and saved it the Interceptor did set the CreatedDate and ModifiedDate properties of the Address object. But this was on the server as I am using remoting, the changes are never reflected back to the object add. Then when I save Individual's object it also saves Address object add, but now as the createddate is null it updates it to null.

I can't force the user to pass the object by ref each time.

any ideas?


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.