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 <[EMAIL PROTECTED]> 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) 
>

Reply via email to