Search the web
Sign In
New User? Sign Up
SimpleORM
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Making detaching the default behaviour   Message List  
Reply | Forward Message #1540 of 1851 |
Re: [SimpleORM] Making detaching the default behaviour

Simply that accessing records after a commit is probably a
bug. Updates to the records will not be reflected in the
database. So the symptoms could be obscure and nasty. I do prefer
the explicit detach.

Anthony

At 08:27 PM 29-01-08, Franck Routier wrote:

>Hi,
>
>I am considering making detaching the records from the connection the
>default behaviour, instead of destroying them, when committing/closing
>the connection.
>
>But I am eager to understand why destroying the records was the default
>behaviour in the first place... Any enlightenmnet on this ?
>
>Thanks,
>Franck
>
>

EMail: berglas@...

+61 7 3369 4065 (Australian Eastern Standard Time)

If the model seems correct only because the numbers look right,
then why build the model in the first place?


Sun Feb 3, 2008 9:50 am

berglas@...
Send Email Send Email

Attachment
7f290027.jpg
Type:
image/jpeg
Forward
Message #1540 of 1851 |
Expand Messages Author Sort by Date

Hi, I am considering making detaching the records from the connection the default behaviour, instead of destroying them, when committing/closing the...
Franck Routier
routier_franck
Offline Send Email
Jan 29, 2008
10:27 am

Simply that accessing records after a commit is probably a bug. Updates to the records will not be reflected in the database. So the symptoms could be...
Anthony & Melissa Ber...
berglas@...
Send Email
Feb 3, 2008
9:49 am

Hi Anthony, in my app, I tend to always detach records, to display and update them in the presentation layer. I also detach them to handle business rules in...
Franck Routier
routier_franck
Offline Send Email
Feb 4, 2008
9:46 am

I like your idea of a detach all records method. It also avoids the issues of partial detachment, where children are detached but not parents. Anthony ... ...
Anthony & Melissa Ber...
berglas@...
Send Email
Feb 4, 2008
11:03 am

Ok, so I went on and added a SConnection.detachDataSet() static method to SConnection. Beware, SConnection.commit(), SConnection.detachAndClose(), ... still ...
Franck Routier
routier_franck
Offline Send Email
Feb 5, 2008
10:51 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help