I have a many-to-many relationship between a pair of tables, using a
mapping table, that Rose::DB::Object::Loader sets up properly for me.

I can use (e.g.) $widget->add_colors($a_color) to add colors to the
widget, so I think it's working right.

I'd like to get a count of the number of colors associated with a
widget.  I know that I could just fetch them and count them, but I
thought that the relationship might provide a count method and now I'm
distracted by the generic question of guessing automagically generated
method names.

>From what I read in
Rose::DB::Object::Metadata::Relationship::ManyToMany, I should have
some method to count the number of e.g. colors associated with a given
widget, and it looks like it's name seems like it might be:

  $widgets->colors_count()

but if I use Data::Dumper one of my object and look in it's
relationships field, I don't see any mention of count in
auto_method_type or method name.

Is the count method not created by default?  If it is, how is it
named?

A while back john gave a nice example of walking through the
documentation to understand how to specify 'now' in SQLite.  Could
someone give the same 'lecture' about automagically created method
names?

Thanks,

g.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to