Dhruv Kumar Jha
Dhruv Kumar Jha11mo ago

Can Ents reference internal tables

I am following the documentation here https://labs.convex.dev/convex-ents/schema My query is can we reference internal tables, like _storage as edges? EXAMPLE:
files: defineEnt({
name: v.string(),
extension: v.string(),
}).edge("_storage"),
files: defineEnt({
name: v.string(),
extension: v.string(),
}).edge("_storage"),
Ent Schema - Convex Ents
Relations, default values, unique fields and more for Convex
2 Replies
Michal Srb
Michal Srb11mo ago
Not via an edge yet, you have to use v.id("_storage") for now (which means cascading deletes have to be handled manually) https://github.com/xixixao/convex-ents/issues/18
GitHub
Allow owning files in storage and deleting them via cascading delet...
Suggested on Discord: https://discord.com/channels/1019350475847499849/1202403482930249789/1202795277132759131 This is tricky because: The ID of the "owning" ent cannot be stored in _stor...
Dhruv Kumar Jha
Dhruv Kumar JhaOP11mo ago
Makes sense. thank you.

Did you find this page helpful?