fix(query): always alias the table when used in joins
This commit is contained in:
parent
8df5ca026b
commit
fd2661160e
1 changed files with 1 additions and 2 deletions
|
|
@ -2079,8 +2079,7 @@ class LinkTableField(DynamicTableField):
|
|||
|
||||
def _get_joined_table(self):
|
||||
table = frappe.qb.DocType(self.doctype)
|
||||
if self.doctype == self.parent_doctype:
|
||||
table = table.as_(f"tab{self.doctype}_{self.link_fieldname}")
|
||||
table = table.as_(f"tab{self.doctype}_{self.link_fieldname}")
|
||||
return table
|
||||
|
||||
def apply_select(self, query: QueryBuilder, engine: "Engine" = None) -> QueryBuilder:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue