On Jun 4, 2007, at 12:35 PM, John Siracusa wrote: > Yes, and it works the same way as for columns. Like columns, > relationships and foreign keys have N named method types created on > their behalf. Examples of method type names are get, get_set, > get_set_on_save, find, count, etc. There are default method type > lists, but users can alter the list by adding and removing types on a > per-relationship basis. > > You can ask any metadata object that makes methods for the name of the > method of a given type by calling the method_name() method. For > example, the column->accessor_method_name implementation is really > just: > > return $column->method_name('get') || $column->method_name > ('get_set') > > http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/ > Metadata/Column.pm#accessor_method_name > > http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/ > Metadata/Column.pm#method_name > > So, to get a "getter" for a relationship, call: > > $rel->method_name('...') || $rel->method_name('...') || ... > > where the "..." parts are the method type names in your order of > preference. > > http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/ > Metadata/Relationship.pm#method_name > > See the relationship docs for the list of supported method types.
Ok. thats basically what I thought. First off, sorry. I copy/pasted the wrong info. i emant to reference: accessor_method_name mutator_method_name i hadn't had coffee yet, and copied the items that referenced them, not them. onwards, this might be where my confusion is -- mutator_method_name states "Returns the name of the method used to set the column value. " many items reference "column" -- but it seems like they work for fkeys/relationships to. maybe all i needed was a doc change? when I wrote the first email, i kind of wanted to patch rose, so relationships act a bit more like columns... do some of the meta pre-caching , re: col names into an array - but only for a) relationships b) fkeys in separate functions but maybe thats not necessary ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object