> sub auto_generate_column > { > my $column = shift->SUPER::auto_generate_column(@_); > $column->add_auto_method_types('get', 'set'); > $column->method_name(get => 'get' . $column->name); > $column->method_name(set => 'set' . $column->name); > return $column; > } > > Notice that I called add_auto_method_types() instead of > auto_method_types(). > It's worthwhile to leave the default "get_set" method type in > there, if only > as yet another way to refer to a column in a Manager query.
Cool thanks. That's close to what I had. I just wasn't sure if it was safe to be overloading the Metadata methods like that. If you go on later to use the: ->meta->setup(columns => [ Foo => { type = int } ]) Style of initializing, will the auto_generate_column() method even get looked at? What would you need to overload to change the default method names? >> If there isn't a way, and people think there should be, I'd be happy >> to work on a patch. > > You're welcome to it! But it's probably a good idea to hash out > the API on > the list before you start actual coding. Remember that you're not > just > deciding how to name methods. You're also deciding which method > types will > be created in the first place. So I think there are two new areas for > convention manager intervention: > > 1. "Thingie" name to method name mapping for a given method type. > > 2. Determining the list of method types for each "thingie." > > ...where "thingie" is a column, foreign key, or relationship. You can > probably just start by doing columns, but it's a good idea to keep > the other > things in mind. Cool, will keep all that in mind. Thanks John. regards, Danial. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object