on 5/16/2000 6:55 PM, John McNally <[EMAIL PROTECTED]> wrote:

> Can you show me your criteria.add statments?

In this case, it doesn't really matter because what I sent in my first email
is the SQL that is generated. I'm testing things on the command line in the
non-gui mysql client.

       Criteria selectCriteria = new Criteria();
        selectCriteria.add( ProjectPeer.PROJECT_ID,
            ProjectVisitorPeer.PROJECT_ID );
        selectCriteria.add( ProjectVisitorPeer.VISITOR_ID, visitor_id );
        return ProjectPeer.doSelect(selectCriteria);

Note that in ProjectPeer.doSelect, I do a few more column adds...

Essentially, BasePeer is generating the SQL correctly...that isn't the
problem...the problem is that it is wrapping this line:

     SCARAB_PROJECT.PROJECT_ID='SCARAB_PROJECT_VISITOR.PROJECT_ID';

in a ''...which MySQL doesn't seem to like. Simply removing the '' makes
things work fine.

I *think* what needs to happen is for SqlExpression to become a bit more
intelligent about adding '' around the items in the build() method...

-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]

Reply via email to