We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have the code like below.
Model_Test { ... 'details' => [ 'key_from' => 'id', 'model_to' => 'Model_Child', 'key_to' => 'parent_id', 'cascade_save' => true, ], ... } Model_Child { ... } $test = Model_Test::forge(...); $test->children = array(); $test->children[] = Model_Child::forge(...); $test->children[] = Model_Child::forge(...); $test->children[] = Model_Child::forge(...); $test->save();
After save() method was called, the keys of $test->children should be imploded PK, But in this case, the key of the first child is still 0.
Because the old key was 0, the comparation with new string key returns true.
Orm\HasMany line189 if ($key != ($current_model_id = $model_to->implode_pk($model_to)))
if ($key != ($current_model_id = $model_to->implode_pk($model_to)))
I think this line should be if (strval($key) != ($current_model_id = $model_to->implode_pk($model_to)))
if (strval($key) != ($current_model_id = $model_to->implode_pk($model_to)))
Actually I don't have any problem yet with this issue. but feel bit weird.
thanks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have the code like below.
After save() method was called, the keys of $test->children should be imploded PK,
But in this case, the key of the first child is still 0.
Because the old key was 0, the comparation with new string key returns true.
Orm\HasMany line189
if ($key != ($current_model_id = $model_to->implode_pk($model_to)))
I think this line should be
if (strval($key) != ($current_model_id = $model_to->implode_pk($model_to)))
Actually I don't have any problem yet with this issue.
but feel bit weird.
thanks.
The text was updated successfully, but these errors were encountered: