}
);
+You need to use the relationship (not the table) name in conditions,
+because they are aliased as such. The current table is aliased as "me", so
+you need to use me.column_name in order to avoid ambiguity. For example:
+
+ # Get CDs from 1984 with a 'Foo' track
+ my $rs = $schema->resultset('CD')->search(
+ {
+ 'me.year' => 1984,
+ 'tracks.name' => 'Foo'
+ },
+ { join => 'tracks' }
+ );
+
If the same join is supplied twice, it will be aliased to <rel>_2 (and
similarly for a third time). For e.g.