I have this strange behavior occuring that maybe someone more knowledgable about Glorp can pinpoint quickly from the symptom
I want to order my objects by sending: self paginator query orderBy: #(site id) where site is an object variable that holds an instance of the (OneToOneMapping) Site class which has, of course an id field.
The query generated is:
SELECT t1.id, t1.cntid, t1.qid, . . . t1.developer, t1.site,
t1.status
FROM (dss.cnts t1 INNER JOIN dss.sites t1 ON (t1.site =
t1.id)) ORDER BY t1.id LIMIT 30
Glorp correctly finds the JOIN table but refuses to give it an alias different than the table to which it is being JOINed.
Assuming it should come up with t2 for the alias of the dss.sites table, the FROM clause should read:
FROM (dss.cnts t1 INNER JOIN dss.sites t2 ON (t1.site =
t2.id)) ORDER BY t2.id LIMIT 30I have set up descriptors and tables for all my domain models (but not class models), I have gotten this orderBy: scheme to work on another application with another db.
Can someone point me in the right direction?
Thanks
John
--
http://jmck.seasidehosting.st