You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prc.user = getInstance( "User" ).newEntity();
// danger Will Robinson! This will not update prc.user.
prc.user.create( {
"firstName": "Dave"
} );
writeDump( prc.user.isLoaded() ); // <--- WILL BE FALSE!
If you want to use create, you must do this instead:
prc.user = getInstance( "User" ).newEntity();
// in order for this to work, you must replace the original variable.
prc.user = prc.user.create( {
"firstName": "Dave"
} );
writeDump( prc.user.isLoaded() ); // <--- WILL BE TRUE
The text was updated successfully, but these errors were encountered:
@elpete, I no longer have access to the Quick documentation on Gitbook for some reason, so I'm posting my suggestion here:
On the page: https://quick.ortusbooks.com/guide/getting-started/creating-new-entities#create
It is critically important to let users know the
create()
method returns a brand new entity, and does not persist the current entity which may have called it.Example:
If you want to use create, you must do this instead:
The text was updated successfully, but these errors were encountered: