Repost of https://sourceforge.net/tracker/?func=detail&atid=376685&aid=937767&group_id=22866
I applaud the new the left-join read ahead option but
the xml descriptors in jbosscmp-jdbc.xml are difficult
to configure. reasons for descriptor change are:
1.) for each query I wish to left-join, I have to
specify the cmr fields each time which leads to
redundancy. grouping the joins is more logical like
load-groups are handled.
2.) writing xdoclet support is non-trivial for the
current left-join descriptors.
so I propose the syntax change from, for example,
<read-ahead>
on-find
<eager-load-group>report</eager-load-group>
<left-join cmr-field="lineItems"/>
<left-join cmr-field="product"
eager-load-group="short"/>
</left-join>
<left-join cmr-field="customer"
eager-load-group="basic"/>
</read-ahead>
to
<read-ahead>
on-find
<eager-load-group>report</eager-load-group>
<left-join-group>group_a</left-join-group>
</read-ahead>
<left-join-groups>
<left-join-group>
group_a
example left join group
<left-join>
<cmr-field>lineItems</cmr-field>
<left-join>
<cmr-field>product</cmr-field>
<eager-load-group>short</eager-load-group>
</left-join>
</left-join>
<left-join>
<cmr-field>customer</cmr-field>
<eager-load-group>basic</eager-load-group>
</left-join>
</left-join-group>
</left-join-groups>
in addition, maybe "left-join" should be renamed to
"relation-join" for clarity.
Maybe. Have a patch? I like left-join, though.