Skip to content
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

withDeleted parameter is not passed to contained tables #33

Open
danioo opened this issue May 18, 2018 · 1 comment
Open

withDeleted parameter is not passed to contained tables #33

danioo opened this issue May 18, 2018 · 1 comment

Comments

@danioo
Copy link

danioo commented May 18, 2018

When I execute get query on Model with Model2 and Model3 associated (Model2 and Model3 also use SoftDeleteTrait) I'm getting only Model2's and Model3's rows where deleted is null instead of all records.

$this->Model->get($id, [
  'withDeleted',
  'contain' => [
    'Model2',
    'Model3'
  ]
]);
@reloxx13
Copy link

reloxx13 commented Oct 16, 2018

Im on cakephp3 and https://github.com/funayaki/cakephp3-soft-delete

i use this to get deleted records in contain:

$As = $this->TableA->find("all", ["withDeleted"])
			->where(
				[
					"TableA.d" => $id,
				]
			)
			->contain(
				[
					"TableB" => [
						'finder' => [
							'all' => [
								'withDeleted',
							],
						],
					],
				]
			);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants