[Bast-commits] r8842 - in DBIx-Class/0.08/trunk: . lib/DBIx
lib/DBIx/Class t/relationship
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Mon Mar 1 17:04:19 GMT 2010
Author: ribasushi
Date: 2010-03-01 17:04:19 +0000 (Mon, 01 Mar 2010)
New Revision: 8842
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSourceProxy.pm
DBIx-Class/0.08/trunk/t/relationship/core.t
Log:
Add has_relationship proxy to row
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2010-03-01 09:22:19 UTC (rev 8841)
+++ DBIx-Class/0.08/trunk/Changes 2010-03-01 17:04:19 UTC (rev 8842)
@@ -2,6 +2,7 @@
- Fix regression on not properly throwing when $obj->relationship
is unresolvable
+ - Add has_relationship method to row objects
0.08120 2010-02-24 08:58:00 (UTC)
- Make sure possibly overwritten deployment_statements methods in
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSourceProxy.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSourceProxy.pm 2010-03-01 09:22:19 UTC (rev 8841)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSourceProxy.pm 2010-03-01 17:04:19 UTC (rev 8842)
@@ -110,4 +110,7 @@
shift->result_source_instance->relationship_info(@_);
}
+sub has_relationship {
+ shift->result_source_instance->has_relationship(@_);
+}
1;
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class.pm 2010-03-01 09:22:19 UTC (rev 8841)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class.pm 2010-03-01 17:04:19 UTC (rev 8842)
@@ -260,6 +260,8 @@
dnm: Justin Wheeler <jwheeler at datademons.com>
+dpetrov: Dimitar Petrov <mitakaa at gmail.com>
+
dwc: Daniel Westermann-Clark <danieltwc at cpan.org>
dyfrgi: Michael Leuchtenburg <michael at slashhome.org>
Modified: DBIx-Class/0.08/trunk/t/relationship/core.t
===================================================================
--- DBIx-Class/0.08/trunk/t/relationship/core.t 2010-03-01 09:22:19 UTC (rev 8841)
+++ DBIx-Class/0.08/trunk/t/relationship/core.t 2010-03-01 17:04:19 UTC (rev 8842)
@@ -79,6 +79,10 @@
} );
$track->set_from_related( cd => $cd );
+# has_relationship
+ok(! $track->has_relationship( 'foo' ), 'Track has no relationship "foo"');
+ok($track->has_relationship( 'disc' ), 'Track has relationship "disk"' );
+
is($track->disc->cdid, 4, 'set_from_related ok, including alternative accessor' );
$track->set_from_related( cd => undef );
More information about the Bast-commits
mailing list