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
{{ message }}
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.
$model = new NormalClient(null); // We have to set scenario to null, it will be set, by populateRecord, later
else if($attributes['type'] == self::BUSINESS_CLIENT)
$model = new BusinessClient(null);
should be:
Code:
$model = new NormalClient(null); // We have to set scenario to null, it will be set, by populateRecord, later
else if($attributes['type'] === self::BUSINESS_CLIENT) <-- changed
$model = new BusinessClient(null);
else <-- added
$model = new Client(null); <-- added
It's needed so that if we're calling delete on a model (using it's Pk), it doesn't try to add in a type value as well. The == was assuming that type = 0 where it was really being sent a blank line.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
On this page: http://canni.github.com/YiiMongoDbSuite/xhtml/special.multimodel.html
Code:
should be:
Code:
It's needed so that if we're calling delete on a model (using it's Pk), it doesn't try to add in a type value as well. The == was assuming that type = 0 where it was really being sent a blank line.
The text was updated successfully, but these errors were encountered: