John Napiorkowski wrote:
> BTW, I notice some people using ->discard_changes in place of
> reload_from_storage. Please don't since this breaks replication support.
>
> John
Um... what is reload_from_storage?
rab...@thesaurus:~/devel/dbic/0.08/trunk$ grep -rc reload_from_storage ./lib |
grep -v ":0$"
./lib/DBIx/Class/ResultSource.pm:1
which just says:
$self->throw_exception(
"Column ${v} not loaded or not passed to new() prior to insert()"
." on ${for} trying to resolve relationship (maybe you forgot "
."to call ->reload_from_storage to get defaults from the db)"
);
OTOH discard_changes is all over the code:
rab...@thesaurus:~/devel/dbic/0.08/trunk$ grep -rc discard_changes ./lib | grep
-v ":0$"
./lib/DBIx/Class/PK.pm:3
./lib/DBIx/Class/Manual/FAQ.pod:5
./lib/DBIx/Class/Manual/Intro.pod:1
./lib/DBIx/Class/Row.pm:6
./lib/DBIx/Class/Ordered.pm:2
./lib/DBIx/Class/Storage/DBI/Replicated.pm:1
./lib/DBIx/Class/CDBICompat/LazyLoading.pm:1
As a matter of fact in Replicated.pm Gotchas section you yourself advocate
use of discard_changes...
What gives?
_______________________________________________
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]