Checklist
Describe the bug
There's an SQL error while searching by multiple columns of joined model
Steps to reproduce the bug
class Table1(Base):
__tablename__ = 'table1'
id: Mapped[int] = mapped_column(primary_key=True)
field1: Mapped[str] = mapped_column(String, nullable=False)
class Table2(Base):
__tablename__ = 'table2'
id: Mapped[int] = mapped_column(primary_key=True)
field2: Mapped[str] = mapped_column(String, nullable=False)
table1_id = Mapped[int] = mapped_column(ForeignKey('table1.id'), index=True, nullable=False)
table1: Mapped['Table1'] = relationship()
class Table3(Base):
__tablename__ = 'table3'
id: Mapped[int] = mapped_column(primary_key=True)
table2_id = Mapped[int] = mapped_column(ForeignKey('table2.id'), index=True, nullable=False)
table2: Mapped['Table2'] = relationship()
class Table3AdminView(ModelView, model=Table3):
column_searchable_list = ['table2.table1.field1', 'table2.field2']
Expected behavior
No response
Actual behavior
Error
sqlalchemy.exc.ProgrammingError: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.DuplicateAliasError'>: table name "table2" specified more than once
Debugging material
No response
Environment
- python 3.12
- sqladmin = {version = "^0.20.1", extras = ["full"]}
Additional context
No response
Checklist
master.Describe the bug
There's an SQL error while searching by multiple columns of joined model
Steps to reproduce the bug
Expected behavior
No response
Actual behavior
Error
Debugging material
No response
Environment
Additional context
No response