On Wed, 5 Apr 2000, Alex Paransky wrote:
> I did, posting a question with the subject "Implementing using CMP quickly
> runs in to limitation...". You responded with
>
> "there are servers (like orion or ejipt and
> probably many more) that let you define whatever sql you like for your
> finders while you still benefit from the optimizations of cmp like result
> set caching."
>
> I AM using Orion, and have not been able to figure out how to put my own SQL
> statement in to the finder. I have read the documentation (on the orion
> site) regarding custom finders, and that only talks about specifying
> $value=$1 which gets translated in to the WHERE clause.
>
> Could you possibly clue me in on how to specify a full SQL with Orion? I DO
> need to join at least two tables to properly implement this finder.
He's an actual example for one of my EJB's. It uses a sybase stored
procedure to retrieve a range of messales in a bulletin board:
<finder-method query="execute find_message_range $1, $2, $3"
partial="false">
<!-- Generated SQL: "execute find_message_range ?, ?, ?" -->
It's that simple! Just add partial="false" to the finder method
sepcficiation and you can specify wharever SQL code you want in there. You
can use this for joined tables and stuff as well.