Bugs item #2492641, was opened at 2009-01-07 20:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2492641&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: orderBy sorts differ on Enums w/ MultipleJoin vs Select
Initial Comment:
Given a structure like:
class Table(SQLObject):
text = EnumCol(enumValues=['a','c','b'])
t2 = ForeignKey("Table2")
When using a regular select query like
Table.select(orderBy="text")
the resulting rows are ordered based on the ordering of the enumValues (a,c,b)
When using a MultipleJoin like
class Table2(SQLObject):
t1 = MultipleJoin("Table", joinColumn="t2_id", orderBy="text")
the list yielded from t1 is ordered based on the alphabetical ordering of the enumValues (a,b,c)
I believe this can be traced to the 'sorter' method in joins.py
Thanks,
James
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2492641&group_id=74338
|