When a DocType has two or more Link fields pointing back to itself and list view tries to join them, pypika auto-aliased both joins with the same '<table>2' suffix, producing a MySQL 1066 'Not unique table/alias' error. Alias each self-referential join with 'tab<doctype>_<link_fieldname>' so every join gets a unique alias, and use the same aliased table in apply_select so SELECT references resolve correctly. |
||
|---|---|---|
| .. | ||
| mariadb | ||
| postgres | ||
| sqlite | ||
| __init__.py | ||
| database.py | ||
| db_manager.py | ||
| operator_map.py | ||
| query.py | ||
| schema.py | ||
| sequence.py | ||
| utils.py | ||