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
Currently there is no way to set default values for fields ,
Enhance Model::create api to consider the value of field from $data argument only if present in $data , otherwise the value should be considered as the value of that field in the instance (can be null or any other value)
class A {
private$f1 = null; // default value is null, if schema does not allow null , then create should fail by throwing BadQueryExceptionprivate$f2 = "enabled"; // default value is enabled// .....
}
The text was updated successfully, but these errors were encountered:
Currently there is no way to set default values for fields ,
Enhance Model::create api to consider the value of field from $data argument only if present in $data , otherwise the value should be considered as the value of that field in the instance (can be null or any other value)
The text was updated successfully, but these errors were encountered: