[Dbix-class] Scalar ref update()'s
Ash Berlin
ash_cpan at firemirror.com
Fri May 16 02:09:03 BST 2008
On 15 May 2008, at 21:04, Marc Mims wrote:
> * Jose Fonseca <zefonseca at gmail.com> [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
>
That strikes me as Too Much Magic. an update_and_refresh method would
be my preferred solution if people really want this.
More information about the DBIx-Class
mailing list