[Dbix-class] Should new_related update _rel_in_storage and friends?
Scott Thomson
smoothhound at gmail.com
Mon Oct 1 11:19:18 GMT 2007
Hi All,
In Row::new there is logic for caching newed but not inserted objects
so that insert can pick them up later and insert them if required.
Are there any technical/theoretical reasons for not simulating or
moving the logic into Relationship::Base::new_related?
E.g. I think the following should work but it currently doesn't ...
my $obj1 = $schema->resultset('MyApp::Obj1')->new($some_args);
my $obj2 = $obj1->new_related('rel', $more_args);
$obj1->insert();
ok($obj2->in_storage());
Cheers,
Scott
More information about the DBIx-Class
mailing list