When I do this...
cpt_codes = ManyToMany(
...
order_by = procedure_cpt_codes.c.cpt_codes_idx
)
# procedure_cpt_codes is the JOIN table in between the parent
(procedure) --- children (cpt_codes)
# procedure_cpt_codes has 3 columns...procedure_id (foreign key),
cpt_code_id (foreign key) and
On Mar 11, 2009, at 6:17 PM, Scott wrote:
When I do this...
cpt_codes = ManyToMany(
...
order_by = procedure_cpt_codes.c.cpt_codes_idx
)
# procedure_cpt_codes is the JOIN table in between the parent
(procedure) --- children (cpt_codes)
# procedure_cpt_codes has 3
order_by accepts a Column object, i.e. table.c.whatever, so pass that in.
Scott wrote:
Is there a way with the current iteration of SQLAlchemy to add a
column to the association table in a many-to-many relationship with
that column used to order the join? I looked at the order_by attribute