Remove warning about pseudohashes with array ref where/cond in ResultSet::search_rs.
my $remove_meth = "remove_from_${meth}";
my $set_meth = "set_${meth}";
+ $rel_attrs->{alias} ||= $f_rel;
+
*{"${class}::${meth}"} = sub {
my $self = shift;
my $attrs = @_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {};
: undef
);
- if (defined $where and %$where) {
+ if (defined $where) {
$new_attrs->{where} = (
defined $new_attrs->{where}
? { '-and' => [
}
: $where);
}
- if (defined $cond and %$cond) {
+ if (defined $cond) {
$new_attrs->{where} = (
defined $new_attrs->{where}
? { '-and' => [
);\r
__PACKAGE__->many_to_many( objects => collection_object => "object" );\r
__PACKAGE__->many_to_many( pointy_objects => collection_object => "object",\r
- { where => { "type" => "pointy" } } \r
+ { where => { "object.type" => "pointy" } }\r
);\r
__PACKAGE__->many_to_many( round_objects => collection_object => "object",\r
- { where => { "type" => "round" } } \r
+ { where => { "object.type" => "round" } } \r
);\r
\r
1;\r