Hello,

I have been having a problem determining how to get an Order By Table to
show up in the From clause when a query string is created by BasePeer.java.

For example, say you are trying to end up with a query like this:

select
    projects.name,
    projects.status,
    projects.start_date,
    projects.account_id
from
    projects,
    accounts
where
    projects.account_id = accounts.account_id
order by
    accounts.name


In my Criteria, I would expect to do something like the following:

criteria.addSelectColumn("projects.name");
criteria.addSelectColumn("projects.status");
criteria.addSelectColumn("projects.start_date");
criteria.addSelectColumn("projects.account_id");
criteria.addOrderByColumn("accounts.name");
criteria.addJoin("projects.account_id", "accounts.account_id");

I would then expect createQueryString in BasePeer.java to add the accounts
table to the From clause if it is not already there.  However, it does not
do this.    

In BasePeer.java, when cycling through the Order By fields, the table name
is parsed and used to set the Order By clause, but the From Clause is not
checked and the table is not added to it.  

Am I missing something?  Is there another way to do this?  Or, should this
functionality be added?  

Any info you can provide would be greatly appreciated.

Thanks,

Paul J. Boyes
AudioBase, Inc.


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to