[% SET did_header = 0 %] [% FOR accessor_type IN [ 'belongs_to', 'might_have', 'has_one', 'has_many', 'many_to_many' ] %] [% SET relationships = [] %] [% FOR rel IN source.relationships %] [% IF rel.type == accessor_type %] [% relationships.push( rel ) %] [% END %] [% END %] [% NEXT UNLESS relationships.size %] [% UNLESS did_header %]

Relationships

[% SET did_header = 1 %] [% END %] [% IF accessor_type == 'many_to_many' %] [% ELSE %] [% END %] [% FOREACH relationships.sort( 'name' ) %] [% SET class = loop.count % 2 ? 'odd' : 'even' %] [% FILTER collapse %] [% IF accessor_type == 'many_to_many' %] [% ELSE %] [% SET fm = foreign_moniker %] [% END %] [% INCLUDE table_comment.tt2 colspan = 3 %] [% END %] [% END %]
[% accessor_type %]
NameLink Rel Foreign RelForeign Class Join Condition
[% name %][% link_rel_name %] [% foreign_rel_name %][% fm %] [% FOR key IN cond.keys %] [% key %] => [% cond.$key %] [% UNLESS loop.last %], [% END %] [% END %]
[% END %]
[%# $Id$ #%]