adelin-b
adelin-b
CCConvex Community
Created by adelin-b on 8/6/2024 in #support-community
How to cascade delete an entity and all references to it in other entities
given a schema like this :
modules: defineTable({
name: v.string(),
documentIds: v.array(v.id("documents")),
})
documents: defineTable({
name: v.string(),
content: v.optional(v.string()),
})
modules: defineTable({
name: v.string(),
documentIds: v.array(v.id("documents")),
})
documents: defineTable({
name: v.string(),
content: v.optional(v.string()),
})
How do should I proceed to have the documentIds automatically removed from the modules when a document is deleted ? I could add a call to the db in the document:delete query so it update the associated modules but I wonder if there is something more robust like a cascading option somewhere like in postgres
6 replies
CCConvex Community
Created by adelin-b on 7/30/2024 in #support-community
How to auth in local mode
Hello, with the current outage and the fact i had to take the train recently. I found the need to run a version of convex in local so I can develop nicely without connection / when convex/clerk has issues. Any hints or pointers ?
2 replies
CCConvex Community
Created by adelin-b on 7/24/2024 in #support-community
How to get Clerk user current selected Organisation
Hello, I would like to be able to know which organisation the user belong to without having to pass it in the query. Two problem: - I added it to the clerk jwt, however in the getIndentity i do not have access to it. - If I do this, how can I invalidate data for the client-side that changed organization ?
5 replies