seitime-frappe/frappe/database
vijayanrxbb 383b24e0f9 fix(db_query): unique alias on self-referential Link joins
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.
2026-04-25 12:42:57 +05:30
..
mariadb fix(schema): drop unique constraint for deleted doctype fields (#36356) 2026-02-20 20:15:32 +05:30
postgres fix(schema): drop unique constraint for deleted doctype fields (#36356) 2026-02-20 20:15:32 +05:30
sqlite feat(sqlite): Set 5s of busy_timeout 2025-10-28 13:54:53 +05:30
__init__.py refactor: Default to mysqlclient (#32987) 2025-06-18 06:04:24 +00:00
database.py feat: provision to configure max_writes_per_transaction in site config 2026-04-13 16:31:05 +05:30
db_manager.py refactor: use a database file directly, instead of an SQL file 2025-04-15 13:59:16 +05:30
operator_map.py perf(query): replace Coalesce with OR IS NULL in func_in (#38336) 2026-04-08 10:57:07 +05:30
query.py fix(db_query): unique alias on self-referential Link joins 2026-04-25 12:42:57 +05:30
schema.py docs(schema): fixed SPECIAL_CHAR_PATTERN constant definition string (#38433) 2026-04-06 15:52:32 +00:00
sequence.py style: re-format with ruff 2024-02-05 18:53:33 +05:30
utils.py fix(postgres): drop_index_if_exists uses DROP INDEX IF EXISTS (#35636) 2026-01-05 11:15:41 +00:00