[Dbix-class] add_column oddness - what am I missing ? (a newbie question)]

Jess Robinson castaway at desert-island.me.uk
Mon Jun 18 09:32:22 GMT 2007


On Sat, 16 Jun 2007, Richard Robinson wrote:

>
> Since I don't know in advance what keys it might meet, I can't create all
> the possible columns beforehand and give a complete list to the
> __PACKAGE__->add_columns startup call, I have to deal with them on the fly.
> On startup, look at the state of the sql table to see what columns it does
> contain, and on new input create new columns in it as necessary (using
> resultset->resultsource->storage->dbh to get at the sql, is there a
> higher-level way to do these ? I don't think so), and then in both cases do
> a ResultSource::add_column().


I suspect it's to do with how you're doing that ->add_columns calling at 
runtime, it would be quite helpful if you posted code to go with your 
problems ;)

Jess




More information about the Dbix-class mailing list