Skip to content

Moor autogenerated primary key, value in null safety. #1148

Answered by davidmartos96
techieasif asked this question in Q&A
Discussion options

You must be logged in to vote

moor generates an extra class along your table data class which is called (MyTable)Companion.
That is meant to be used for insertions or updates. The id would be optional when using the companion. So instead of creating a list of data classes try creating a list of companions

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@techieasif
Comment options

@simolus3
Comment options

@techieasif
Comment options

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