From: Simon Cozens Date: Sat, 22 May 2004 20:08:45 +0000 (+0000) Subject: related() patch from Marcus. X-Git-Tag: 2.10~218 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=e09a41e6b9e9986c6437a33cf9a78149a64d8252;p=maypole.git related() patch from Marcus. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@144 48953598-375a-da11-a14b-00016c27c3ee --- 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 {