I think this can be solved two ways.  If you are selecting
ProjectPeer.PROJECT_ID, the join should be automatic, so I assume you are
not selecting it.  You can either add it to the select columns or try

selectCriteria.add("forcing a join", (Object)(ProjectPeer.PROJECT_ID + "=" +
ProjectVisitorPeer.PROJECT_ID), Criteria.CUSTOM );

A bit ugly, but currently, this is the way to get any sql you want into the
where clause.


----- Original Message -----
From: jon * <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Tuesday, May 16, 2000 7:10 PM
Subject: Re: BasePeer problem


> on 5/16/2000 7:08 PM, John McNally <[EMAIL PROTECTED]> wrote:
>
> >> selectCriteria.add( ProjectPeer.PROJECT_ID,
> >> ProjectVisitorPeer.PROJECT_ID );
> >
> > Eliminate this line; and then what does the generated sql look like?
>
> I can't...it removes the join...ie: the offending line.
>
> -jon
>
> --
>     Java Servlet Based - Open Source  |        Collab.Net
>         Bug/Issue Tracking System     |   now hiring smart people
>        <http://scarab.tigris.org/>    |  <http://Collab.Net/jobs/>
>
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to