ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: getting database copy rather than existing object, or cached copy
Date Wed, 13 Apr 2005 14:11:05 GMT
iBatis will retrieve a fresh object from the database each time. Are
you using a cache on your mapped statement for getObjectById(...)?

Brandon

On 4/13/05, Akins, Greg <gakins@amervideo.com> wrote:
>  
> I'm trying to compare what's in the database against what an object
> currently is... 
>   
> So I thought this would work 
>   
> Status oldStatus =
> ((HoldAvp)adao.getObjectById(holdAvp.getId())).getStatus() ;
> Status newStatus = holdAvp.getStatus() ; 
>   
> However, oldStatus has the updated value, even though I can see in the
> database it hasn't been updated yet. 
>   
> Can I use Ibatis to get the current database value?  Or do I have to use
> JDBC?  Or am I thinking about this the wrong way? 
>   
>  
> Greg Akins 
> Software Engineer 
> Sony Electronics, STP Systems 
> 724.696.7322 (Sony) 
> 724.696.6147 (AV) 
> 724.454.7790 (Cell) 
> 412.590.3973 (Pager) 
>

Mime
View raw message