query(SomeJoinedTableClass).filter(SomeJoinedTableClass.foo.contains(bar)) generates quasi-invalid SQL

Issue #1430 resolved
Mike Bayer repo owner created an issue

i.e. of the form:

select * from
bar_table, base_table JOIN subclass_table on base_table.id=subclass_table.id
WHERE base_table.id=bar_table.base_id AND bar_table.other_id=<bar id>

postgres accepts this but we've heard MySQL 5 does not. verify mysql blows up on this form.

not sure what solution there could be to this one since contains() is not going to make implications about the overall FROM clause that would allow the joined-table query to be aliased.

Comments (3)

  1. Mike Bayer reporter

    FWIW, if you have a m2m relationship to a joined table mapping, the lazy load of the target also produces "select * from secondary, target_base join target_child on <>". It works fine in MySQL 5 over here. So I'm becoming skeptical that there's any issue here.

  2. Log in to comment