Re: Searching OO Associations with RDBMS Persistence Models



Hi,
as the lack of replies indicates, there are no good solution for your
problem. OOA/D does not provide any tools for non-trivial searches like
your. Using OOA/D, the standard solution would be to create a
findByNameStartingWithAndByLocation()-method in the Company class. The
implementation of the find-method would use SQL.

Many OO evangelists claim that searches are not needed in well design
OO applications. You have to redesign your application to avoid the
scenario above. Obviously reporting, etc, should not be done using
OOA/D.

Fredrik Bertilsson
http://moonbird.sourceforge.net

.