> I don't think I'd like to see an automatic reload on update. In my own > code, the update is the last operation I perform on the object and I > wouldn't want to see it generate another round trip to the DB.
True indeed. Especially because of the point you made next: the update doesn't necessarily mean you'll read it immediately. > Perhaps it would be useful to automatically reload on the next access to > an object with scalarref values. This is a good suggestion. Reading back from scalar ref'd update would need a round trip anyway, I don't see an alternative(using ANSI SQL at least). This solution would delay the round trip up until no longer avoidable. Sort of an inverted COW (copy-on-write) for fields marked "dirty" after a scalar ref'd update. JF On Thu, May 15, 2008 at 5:04 PM, Marc Mims <[EMAIL PROTECTED]> wrote: > * Jose Fonseca <[EMAIL PROTECTED]> [080515 12:30]: > > I raised the issue here as a sort of RFC on whether DBIC should > > reload-on-write from the RDBMS automatically when updated with a scalar > > ref(literal SQL command). It seems reasonable that it should, I don't > think > > the returned SQL snippet is useful under any circumstance. > > I don't think I'd like to see an automatic reload on update. In my own > code, the update is the last operation I perform on the object and I > wouldn't want to see it generate another round trip to the DB. > > Perhaps it would be useful to automatically reload on the next access to > an object with scalarref values. > > -Marc > > _______________________________________________ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ > Searchable Archive: > http://www.grokbase.com/group/[EMAIL PROTECTED] > -- http://zefonseca.com/
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
