i've been writing my own count_related() methods and just realized
that RDBO should be able to create these for me (but names them
related_count)..
is there a better way to get related_count() methods?
attachments => {
type => 'many to many',
map_class => 'MyDB::RelatedAttachment',
map_from => 'asset',
map_to => 'related',
manager_args => { sort_by => 'related_asset.sort_order' },
method_types => [
Rose::DB::Object::Metadata::Relationship::ManyToMany-
>default_auto_method_types(),
'count'
],
},
is there a compelling reason to not have these _count methods created
for all my *-to-many relationships?
if not, how would i go about that cleanly?
subclass Rose::DB::Object::Metadata::Relationship::ManyToMany,
override default_auto_method_types, and then override
relationship_type_classes in my Metadata base class, or is there a
more sensible approach?
thanks,
michael.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object