Re: [Maypole-dev] Maypole/View/Base.pm patch, table -> table_alias

From: Marcus Ramberg (marcus at thefeed.no)
Date: Mon Oct 25 2004 - 08:07:19 BST


On 23. okt. 2004, at 04.23, Steve Simms wrote:

> Steve Simms said:
>> 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.
>
> If it *should* use table_alias, the factory files are going to need
> updating
> as well, which I'd be happy to do, but I want to wait for feedback on
> my first
> patch before sending in more of them.

Hey Steve.

So what you are saying is "use table_alias instead of table" ... At the
moment, we only have 1 Model class, but Maypole's ambition is to
support several database mappers, work on DBIx::SearchBuilder is
already underway. Using table_alias seems clumsy.

If they are interchangeable, I think Class::DBI should return the alias
when it's set, I suggest you post about this on the CDBI list. However,
if that route is not possible, I guess here would be to somehow make
Maypole::Model::CDBI::table return the aliased name. This might be as
easy as overriding "table" in ::CDBI, but I'm not sure of the
implications for setup.

Marcus

_______________________________________________
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