Table name appears twice in query /u/hephaestus716 Python Education

Hi. I’m using sqlalchemy. I have a list of conditions (BinaryExpression of sqlalchemy) self._table is sqlalchemy Table I’m trying to apply a select and then where on my conditions, but the rendered query is somehow with the table name twice: “FROM table_name , table_name”

The row that creates it is: query = select(self.table).where(and(*conditions))

conditions is being built through approaching self._table.c self._table is sqlalchemy Table object

I read is something about referring the object twice, (in select and then in where conditions) but don’t know if that’s really the problem or something else.

Help me solve this pls🙏

submitted by /u/hephaestus716
[link] [comments]

​r/learnpython Hi. I’m using sqlalchemy. I have a list of conditions (BinaryExpression of sqlalchemy) self._table is sqlalchemy Table I’m trying to apply a select and then where on my conditions, but the rendered query is somehow with the table name twice: “FROM table_name , table_name” The row that creates it is: query = select(self.table).where(and(*conditions)) conditions is being built through approaching self._table.c self._table is sqlalchemy Table object I read is something about referring the object twice, (in select and then in where conditions) but don’t know if that’s really the problem or something else. Help me solve this pls🙏 submitted by /u/hephaestus716 [link] [comments] 

Hi. I’m using sqlalchemy. I have a list of conditions (BinaryExpression of sqlalchemy) self._table is sqlalchemy Table I’m trying to apply a select and then where on my conditions, but the rendered query is somehow with the table name twice: “FROM table_name , table_name”

The row that creates it is: query = select(self.table).where(and(*conditions))

conditions is being built through approaching self._table.c self._table is sqlalchemy Table object

I read is something about referring the object twice, (in select and then in where conditions) but don’t know if that’s really the problem or something else.

Help me solve this pls🙏

submitted by /u/hephaestus716
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *