Skip to content

How does cascade work? #149

Answered by kkharji
jghauser asked this question in Q&A
Sep 17, 2022 · 1 comments · 11 replies
Discussion options

You must be logged in to vote

Hey @jghauser , Sorry for the later replay. at first glance, everything looked okay, but after testing the code, I couldn't understand why it didn't work 😆. Luckily after reviewing the tests files on cascading, it turns you are missing pk key in id.

Try data.id = { type = "integer", pk = true }. pk enable a field to be treated as a primary key.

Edit: referenced key can not have unique = true as in data.entry.unique

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@kkharji
Comment options

@jghauser
Comment options

@jghauser
Comment options

@kkharji
Comment options

@jghauser
Comment options

Answer selected by kkharji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants