> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Avi Kivity
> How about the following problem:
>
> Bean A is in a 1:many relationship with bean B. Now I would like that a
> finder called on A would invoke two select calls, to fetch all the A's and
> to fetch all the B's
>
> for example:
>
> aHome.findBySomeProprety(7) ->
>
> select a.id, a.property
> from a
> where a.property > 7
>
> and then:
>
> select b.id, b.someotherfield, b.aref
> from a, b
> where a.id=b.aref
> and a.property > 7
>
> (This would be the equivalent of a join. Alternatively, I
> wouldn't much mind if the container requested a single SQL with the join)
Well, it seems to me this example is way too specific to be handled through
CMP. You would need to go with BMP for that. Note that you could actually
use both, and leverage underlying CMR relationships to perform some of those
queries for you. But for the final result, you would definitely need to
write some code by hand.
--
Cedric
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".