Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(m2m): correctly infer which columns belong to which model
The first `len(m.rel.M2MBaseFields)` columns are always coming from the M2M table, as specified in the M2M join query in function `relationJoin.m2mQuery()`. Thus we compare the `scanIndex` to this value. Additionally, more columns can be requested by the caller, and so the checking the `m.table.FieldMap` is still relevant.
- Loading branch information