mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat(databases): allow multiple 1 way relationships btwn collections
Because two way key is not exposed or sent, the API defaults to the related collection's ID as the two way key. As such, if you try to add another one, it will fail because the two way key is already in use.
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -1,5 +1,5 @@
|
||||
<script context="module" lang="ts">
|
||||
import { Query, type Models, RelationshipType, RelationMutate } from '@appwrite.io/console';
|
||||
import { ID, Query, type Models, RelationshipType, RelationMutate } from '@appwrite.io/console';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
|
||||
export async function submitRelationship(
|
||||
@@ -21,7 +21,7 @@
|
||||
data.relationType,
|
||||
data.twoWay,
|
||||
data.key,
|
||||
data.twoWayKey,
|
||||
data.twoWayKey ?? ID.unique(),
|
||||
data.onDelete
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user