Hi Maypole Developers,
I've spent the past week learning how Maypole works and looking through its
source code, and I like what I see. I'm trying to implement it as a
replacement to one or more of our internal database programs at work.
An immediate roadblock that I hit is that we do all of our database access
through views, rather than tables, so the default Class::DBI::Loader(::Pg)
didn't work very well for me. I got around that by writing my own loader and
using table aliases.
However, the next problem I hit was that the links in the web app would point
to the view's name, rather than the alias that I'm using.
So, for example, I have a view called "core_employees_3" that gives employee
information. That doesn't make for a very nice module name, though, and I
want the links to look like "/employees/list" instead of
"/core_employees_3/list", so I wrote the following in my customized Loader.pm:
$class->table("core_employees_3");
$class->table_alias("employees");
This works fine on the frontpage, because my config->display_tables uses the
aliased names. Maypole::View::Base, however, sets classmetadata.table to be
$class->table, instead of $class->table_alias.
Should it do the latter? It looks to me like it should, and doesn't break the
case when I'm using normal tables. I'm hardly an expert, though.
Attached is a diff of the change that I made (I'm using the 1.99 release). If
it seems reasonable to you, could this be committed? If not, what should I be
doing differently?
Thanks,
Steve Simms
_______________________________________________
maypole-dev mailing list
maypole-dev at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole-dev
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT