So here it is:
$row->discard_changes;
It comes from DBIx::Class::PK (and not from DBIx::Class::Row where I usually start the serach).
Update: The core devs say that the new version of documentation will mention discard_changes in DBIx::Class::Row POD. Thanks.
2 comments:
Actually, discard_changes doesn't work at all without the PK - fortunately SERIAL is handled just fine by the last_insert_id stuff in Storage. The point of using discard_changes as a refresh is where there are non-PK columns that you need to reload.
Thanks. I've updated the note.
Post a Comment