I am interested in generating separate accessor and mutator methods for 
my columns, as opposed to the single unified get_set method.

Reading throught the Rose::DB::Object::Metadata::Column docs, it looks 
like I can manually create get and set methods from setup via the 
columns declaration, but I'm stuck on how to proceed either in the case 
of manually specifying what the name of the accessor and mutator should 
be, and the more desirable case where get_* and set_* are created by 
default.

__PACKAGE__->meta->setup(
        table   => 'items',
        columns =>      
        [
                id => { type => 'int', not_null => 1,

                },
                name => { type => 'varchar', not_null => 1,

                }
                
        ],
);

would create get_id, set_id, get_name and set_name methods in my class.


It would be great to be able to set it from my base Object class by 
default, so every table class does this by default, with per-class and 
then per-column specifications as alternatives.

Any help would be appreciated.


BTW, there appears to be a typo in the 
Rose::DB::Object::Metadata::Column docs, in the
"MAKING METHODS" section under the text

"The default method map is:"

the titles are get_set, get, and get_set. The final get_set should 
probably be just "set"

Many thanks,

- jud


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to