Fix ambiguous SQLAlchemy join for AI generation run relationships
This commit is contained in:
@@ -68,5 +68,6 @@ class AIGenerationRun(Base):
|
|||||||
generated_items: Mapped[list["Item"]] = relationship(
|
generated_items: Mapped[list["Item"]] = relationship(
|
||||||
"Item",
|
"Item",
|
||||||
back_populates="generation_run",
|
back_populates="generation_run",
|
||||||
|
foreign_keys="Item.generation_run_id",
|
||||||
lazy="selectin",
|
lazy="selectin",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ class Item(Base):
|
|||||||
generation_run: Mapped[Union["AIGenerationRun", None]] = relationship(
|
generation_run: Mapped[Union["AIGenerationRun", None]] = relationship(
|
||||||
"AIGenerationRun",
|
"AIGenerationRun",
|
||||||
back_populates="generated_items",
|
back_populates="generated_items",
|
||||||
|
foreign_keys=[generation_run_id],
|
||||||
lazy="selectin",
|
lazy="selectin",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user