ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Subbiah" <subb...@utdallas.edu>
Subject RE: Update SQL Problem
Date Fri, 10 Jun 2005 16:14:50 GMT
The Problem is this
I have an object 'user' - My actual object is made from 3 records from 3
different tables (login, profile and permissions) . Say for eg, profile and
permission entries are rarely updated but login is updated after each login
to change the 'last accessed date'. So in my 
'user'  object if I do an update, I don't want to be updating 3 records
when one record in the db needs to be updated.

I am doing this to keep my db design independent of my framework.

I thought about 'isupated' as you suggested but wasn't sure if it was the
right way to do it.

regards,
Subbiah
subbiah@questforum.org
972 883 6849
 

> -----Original Message-----
> From: James, Steven [mailto:Steven.James@logicacmg.com] 
> Sent: Friday, June 10, 2005 11:02 AM
> To: user-java@ibatis.apache.org
> Subject: RE: Update SQL Problem
> 
> Quite simple as far as i know ibatis does not help with this.. 
> 
> First ask youreslf if this is a big problem.  How vital is a 
> few microseconds compared to the added amount of your code 
> you may need to write.
> 
> 1 easy strategy that i have used is an isupdated field in 
> your value object.. Then if set update..
> 
> Only consider improving a programs performance when it is 
> working as until users get thier hands on it you never know 
> where the real bottlenecks lie... I have seen to many 
> projects spend way to much time pre-quessing performance 
> issues only to find that they really had little idea where 
> the code was spending it time..
> 
> Steve
> 
> 
> -----Original Message-----
> From: Subbiah [mailto:subbiah@utdallas.edu]
> Sent: Fri 6/10/2005 4:50 PM
> To: ibatis-user-java@incubator.apache.org
> Subject: Update SQL Problem
>  
> Hi,
> 
> Here comes work -
> 
> I have an Object which is corrresponding to a SQL table record.
> 
> Ibatis constructs this object for me after I seek the record.
> 
> I modify few fields and now I have to update the SQL table record.
> 
> So I give Ibatis this modified object to update.
> 
> Problem :-
> 
> How can I detect the object has modified, If its modified 
> only then I would like to call the update of Ibatis Is there 
> any way ???
> 
> Thanks
> 
> Sagar 
> 
>  
>  
> 
> This e-mail and any attachment is for authorised use by the 
> intended recipient(s) only. It may contain proprietary 
> material, confidential information and/or be subject to legal 
> privilege. It should not be copied, disclosed to, retained or 
> used by, any other party. If you are not an intended 
> recipient then please promptly delete this e-mail and any 
> attachment and all copies and inform the sender. Thank you.
> 
> 


Mime
View raw message