- Back out self-cleaning from DBIx::Class::Carp for the time being
(as a side effect fixes RT#86267)
- Tests no longer fail if $ENV{DBI_DSN} is set
+ - Throw clearer exception on ->new_related() with a non-existent
+ relationship.
* Misc
- Replace $row with $result in all docs to be consistent and to
if (ref $self) { # cdbi calls this as a class method, /me vomits
my $rsrc = $self->result_source;
+ my $rel_info = $rsrc->relationship_info($rel)
+ or $self->throw_exception( "No such relationship '$rel'" );
my (undef, $crosstable, $cond_targets) = $rsrc->_resolve_condition (
- $rsrc->relationship_info($rel)->{cond}, $rel, $self, $rel
+ $rel_info->{cond}, $rel, $self, $rel
);
$self->throw_exception("Custom relationship '$rel' does not resolve to a join-free condition fragment")
'No back rel'
);
+throws_ok {
+ my $new_bookmark = $schema->resultset("Bookmark")->new_result( {} );
+ $new_bookmark->new_related( no_such_rel => {} );
+} qr/No such relationship 'no_such_rel'/, 'creating in uknown rel throws';
{
local $TODO = "relationship checking needs fixing";