Re: [Maypole] 2.05 bug in Maypole::View::Base?

From: Tony Bowden (tony-maypole at kasei.com)
Date: Wed Dec 29 2004 - 23:22:33 GMT


On Wed, Dec 29, 2004 at 02:58:58PM -0800, Peter Speltz wrote:
> I'm getting the "can't fetch data as class method error.
> If description is a reserved word somewhere in Maypole, CDBI , or sql or a bad
> choice of column names, i'll change my column name but i'm not aware of it.

It's not reserved in CDBI or SQL, so it must be Maypole.

And having to change column names is a bad thing.

Class::DBI has to be really careful when adding new methods in case they
clash with likely column names[1]. Maypole is going to have to be
equally careful in this regard.

Tony

[1] Obviously almost anything could be a column name. If someone has a
column called 'has_many', or 'discard_changes', Class::DBI isn't happy
unless they rename their column. Having a column called 'accessor_name'
is really going to screw things up. But I've had to get rid of methods
like 'min' and 'max' which are fairly column names, and replace them
with 'minimum_value_of' and 'maximum_value_of'.

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT