From e09a41e6b9e9986c6437a33cf9a78149a64d8252 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Sat, 22 May 2004 20:08:45 +0000 Subject: [PATCH] related() patch from Marcus. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@144 48953598-375a-da11-a14b-00016c27c3ee --- Makefile.PL | 1 + lib/Maypole/Model/CDBI.pm | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 18b21ca..cd0fd96 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,6 +13,7 @@ WriteMakefile( Class::DBI::AsForm => 0, Class::DBI::FromCGI => 0, Class::DBI::Loader::Relationship => 0, + Class::DBI => 0.96, CGI::Untaint => 0, UNIVERSAL::moniker => 0, UNIVERSAL::require => 0, diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index 71e1a49..cbecaf1 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -26,12 +26,7 @@ modules. sub related { my ($self, $r) = @_; - - # Has-many methods; XXX this is a hack - map {to_PL($_)} - grep { exists $r->{config}{ok_tables}{$_} } - map {$_->table} - keys %{shift->__hasa_list || {}} + return keys %{$self->meta_info('has_many') || {}}; } sub do_edit :Exported { -- 2.39.5