Skip to content

UUID duplicate in OneToMany relations? #500

Answered by collerek
Inkapa asked this question in Q&A
Discussion options

You must be logged in to vote

You need to pass a callable to default and not the result of the function call. So pass uuis.uuid4 (note there are no parenthesis).

In your code you set it to one UUID (result of uuid4 function evaluated on script start), same for all model instances. This is equivalent of setting default to constant.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Inkapa
Comment options

Answer selected by Inkapa
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