> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Dominik Drzewiecki
> Lets assume I am using 1.1 CMP Entity Bean.
> Is it possible to write finder SQL queries for findXXX() methods
> which rely on joint table data.
Obviously, yes, you can write any SQL queries you want to fetch information
from joint tables, but you will need to use BMP if you want to use EJB 1.1.
On top of that, there is no standardized query language for EJB 1.1 CMP, so
your question could only be answered in the context of a specific server.
Should you decide to switch to EJB 2.0, your problem would be solved
automatically through relationships (whose implementation will typically
match closely the one you are suggesting with the extra table containing the
mapping of foreign keys for the two beans taking part in the relationship).
If CMP 2.0 relationships are not powerful enough to address your need, you
can resort to using EJB-QL, which has the merit to be standardized and
therefore available on any EJB 2.0 compliant server.
--
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".