Skip to content

Commit 8cb670e

Browse files
committed
Merge branch 'staging' into jir-fix-transducer
2 parents c0fa001 + 93893cb commit 8cb670e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

db/thing.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ class Thing(Base, AutoBaseMixin, ReleaseMixin, StatusHistoryMixin, PermissionMix
223223
lazy="joined",
224224
)
225225

226+
links: Mapped[List["ThingIdLink"]] = relationship(
227+
"ThingIdLink",
228+
back_populates="thing",
229+
cascade="all, delete-orphan",
230+
passive_deletes=True,
231+
)
232+
226233
# --- Association Proxies ---
227234
assets: AssociationProxy[list["Asset"]] = association_proxy(
228235
"asset_associations", "asset"
@@ -280,7 +287,7 @@ class ThingIdLink(Base, AutoBaseMixin, ReleaseMixin):
280287
alternate_id: Mapped[str] = mapped_column(String(100), nullable=False)
281288
alternate_organization: Mapped[str] = lexicon_term(nullable=False)
282289

283-
thing: Mapped["Thing"] = relationship("Thing", backref="links")
290+
thing: Mapped["Thing"] = relationship("Thing", back_populates="links")
284291

285292

286293
class WellScreen(Base, AutoBaseMixin, ReleaseMixin):

0 commit comments

Comments
 (0)