Closed yudha-dev closed 3 weeks ago
Hey @yudha-dev! 👋🏻
Could you clarify what you mean by "it isn't working"? I've implemented this several times in my project without any issues. If you could share a reproduction of the problem, I'd be happy to help troubleshoot.
I tried the above model and ran the seeder, but it didn’t work and said that the ID must be filled. It doesn’t create automatically; we need to define the ID first
Try to add this to your model
static selfAssignPrimaryKey = true;
@yudha-dev As mentioned by Romain please share a reproduction repo for us to further debug the issue
yes i try again and works.. thanks
Package version
21.3.0
Describe the bug
I tried to set a default random ID as the primary key using randomUUID, but it isn't working
Reproduction repo
No response