[CDBI] Obtain has_a Module Through find_column
jay at rigadon.com
Tue Nov 8 10:02:17 GMT 2005
Thanks Peter - much appreciated! This is gonna save me alot of time - or
it would if I hadn't have already re-implemented it!?!
Is there an easy way to check input with this method? Can I provide some
instruction in my table module that will force a value to be verified
using a specific function before the database is populated? I guess I'm
looking for some kind of accessor/mutator? Specifically I want to verify
that the value I pass into my URL database field is indeed a valid URL...
Peter Speltz wrote:
> On 11/7/05, Jay Hargreaves <jay at rigadon.com> wrote:
>>I am looking to setup a generic form for creating database entries. I
>>need to obtain information on a has_a relationship through the
>>find_column method so I can populate a drop-down list with available
>>values. My MyModule::Link table module contains the following line:
>>__PACKAGE__->has_a(link_category_id => 'MyModule::LinkCategory' );
> Check out Class::DBI::AsForm. It does that automatically for has_a columns.
bingo, bango, bosh...
More information about the ClassDBI