From f3711a93832df46dc245075df08b9ebfc05266e9 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Wed, 21 Aug 2024 16:22:08 +0200 Subject: forgot to commit for a while --- Zettelkast/Notes/060620241559 - Adjacency Lists.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Zettelkast/Notes/060620241559 - Adjacency Lists.md (limited to 'Zettelkast/Notes/060620241559 - Adjacency Lists.md') diff --git a/Zettelkast/Notes/060620241559 - Adjacency Lists.md b/Zettelkast/Notes/060620241559 - Adjacency Lists.md new file mode 100644 index 0000000..c2e9003 --- /dev/null +++ b/Zettelkast/Notes/060620241559 - Adjacency Lists.md @@ -0,0 +1,3 @@ +Adjacency list is a self-referential relationship. In SQLAlchemy we can achieve this by creating a ForeignKey on the table to itself. In the mapper we can add a relationship property and specify remote_side=[table.c.id]. + +This is what I used to give backups a "base" reference. \ No newline at end of file -- cgit v1.2.3