How do you handle foreign keys with `sqldelight` i...
# squarelibraries
u
How do you handle foreign keys with
sqldelight
in a multi module app? I split my modules into api and impl parts, where
.sq
files live in impl module. The only way I see it is to have child-impl (containing child.sq) depend on parent-impl (containing parent.sq), and then I can simply
foreign key (parentId) references parent(id)
... Which is however against our policy (to only depend on api modules, never impls) Could maybe the FK be "bolted on" at app module level? (where the final
Database
lives,)
e
Not an answer, but issues like this led me to just keep all my SqlDelight files in one module.
u
hmm, that however means you have a single app, right? I have multiple apps which share some entities