A virtual value that is not stored in the DB. This could for example be useful if you want to provide a default value in your model that is returned to the user but not stored in the DB.
A virtual value that is not stored in the DB. This could for example be useful if you want to provide a default value in your model that is returned to the user but not stored in the DB.
You could also use it to validate a value before permuting and storing it. Checking password length before hashing it for example:
You could also use it to validate a value before permuting and storing it. Checking password length before hashing it for example:
...
@@ -250,6 +250,7 @@ Return type is mostly usefull for setups that rely on types like GraphQL.
...
@@ -250,6 +250,7 @@ Return type is mostly usefull for setups that rely on types like GraphQL.
}
}
}
}
}
}
```
In the above code the password is stored plainly in the password field so it can be validated, but is never stored in the DB.
In the above code the password is stored plainly in the password field so it can be validated, but is never stored in the DB.