-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
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
Filtered record being deleted on update #54
Comments
closely related #48 |
Hi I have been having the same issue. The problem is that it checks for ActiveQuery link parameter which return the relationship link but does not send the additional information such as on conditions and other conditions added to the relationship. |
The $AQ variable has the conditions etc we can use that to add the delete query with more conditions based on the relationship condition |
@deadmantfa so currently how did u handle this... trait RelationTrait
{
....
public function saveAll($skippedRelations = [],$ignoreList = [])
{
....
if($relModel->classname() === 'common\models\Branch'){
$notEffective = ['not in', 'id', $ignoreList['common\models\Branch']];
$query = ['and', ['company_id'=>12], ['not in', 'id', $notDeletedPK]];
var_dump($relModel);
array_push($query, $ignoreList);
// var_dump($query);
}
}
} |
@kidzen Thanks for this I am trying a much better approach as i want to follow the code that's been there I am going to make a pull request on it soon. |
This is a really major issue deleting records with a parent update, this must be solved urgently or this soft won't be used anymore. |
Hi, is there any update? The software is really helpful and a great idea! Do anyone know a equal alterantive? |
The linked issue has a commit that solves the problem. |
Type 🐛
on update company record, those record with type 11 and above got deleted...
Suggestion :
add $ignoreClause parameter for saveAll() as additional
or adding list of effectiveIds only
The text was updated successfully, but these errors were encountered: