I'm having problems using the CMR-fields. When a collection is returned, I should not have all the related objects. For example there's a relation between Car-brands (Ford, Opel, Chrysler,..) and Cars. The ejb for carbrands contains a cmr-field "cars" and a ejb-relationship-role with the name carsrelationshiprole. When I use the get-method all related cars are returned, but I only want the cars where sold='false'.
My question (hope the example is not too confusing): Is is possible to add a condition to the cmr-field or to the relationship (<ejb-relationship-role>)? I got a feeling I should add the condition to the jbosscmp-jdbc.xml file, but I can't find a decent tag.
why don't you add a finder on the cars that finds by the FK and sold field?