Closed gaetan-hexadog closed 2 weeks ago
.create
should be chained to the end of the get: https://watermelondb.dev/docs/CRUD#create-a-new-record
Thanks but unfortunately I still get the same issue with the following code
return await database.write(async () => {
// Création d'un nouvel utilisateur
return await database.get('users').create(newUser => {
newUser.email = userData.email;
newUser.name = userData.name;
});
});
Apparently there was a problem with the global configuration of my project. I've restarted a project from scratch and everything works. thanks
Hi,
How can I create or update my model ? I always get the following error message
Not allowed to change record outside of create/update()
with a simple code likeregards