in reply to Class::DBI: Filtering a many-to-many mapping does not work as advertised on CDBI manpage?

The example you are copying is a one-to-many, not a many-to-many with a mapping table. Class::DBI's concept of using a mapping class for many-to-many is usually a bad idea. It will result in lots of unnecessary database calls. It's much better to use the approach described as Ima::DBI methods in the man page and write set_sql() statements with joins in them.
  • Comment on Re: Class::DBI: Filtering a many-to-many mapping does not work as advertised on CDBI manpage?

Replies are listed 'Best First'.
Re^2: Class::DBI: Filtering a many-to-many mapping does not work as advertised on CDBI manpage?
by unlinker (Monk) on Nov 09, 2008 at 03:33 UTC
    Thanks. I assumed that since a many-to-many was a two way one-to-many via an intersection table (in my case HotelCategories) using a one-to-many example in either direction would work.
    Thanks for the suggestion, I will check out the Ima::DBI methods.