New test for recent prefetch/undef bug
[dbsrgits/DBIx-Class.git] / t / lib / PrefetchBug / LeftRight.pm
diff --git a/t/lib/PrefetchBug/LeftRight.pm b/t/lib/PrefetchBug/LeftRight.pm
new file mode 100644 (file)
index 0000000..cf76ec0
--- /dev/null
@@ -0,0 +1,24 @@
+package
+    PrefetchBug::LeftRight;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('left_right');
+__PACKAGE__->add_columns(
+    left_id => { data_type => 'integer' },
+    right_id => { data_type => 'integer' },
+    value => {});
+
+__PACKAGE__->set_primary_key('left_id', 'right_id');
+__PACKAGE__->belongs_to(left => 'PrefetchBug::Left', 'left_id');
+__PACKAGE__->belongs_to(
+    right => 'PrefetchBug::Right',
+    'right_id',
+#    {join_type => 'left'}
+);
+
+
+1;