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

bug 1:1 relationship #588

Closed
wants to merge 3 commits into from
Closed

bug 1:1 relationship #588

wants to merge 3 commits into from

Conversation

qwerin
Copy link
Contributor

@qwerin qwerin commented Jul 18, 2022

Nasel jsem chybku viz:

public function testGetEntity(): void
	{
		$ean = new Ean();
		$ean->code = '1234';
		$ean->book = $this->orm->books->getByIdChecked(1);
		$this->orm->eans->persistAndFlush($ean);
		$eanId = $ean->id;

		$this->orm->clear();

		$ean = $this->orm->eans->getByIdChecked($eanId);
		$book = $ean->book;
		Assert::equal(1, $book->id);

	}

@hrach
Copy link
Member

hrach commented Jul 18, 2022

What is the bug? it is intenionally done the way the Ean cannot exist without a booking.

@hrach
Copy link
Member

hrach commented Jul 18, 2022

Ok, I see the testcase should show the bug. It the |null related to that?

@hrach hrach added the bug label Jul 18, 2022
@qwerin
Copy link
Contributor Author

qwerin commented Jul 18, 2022

Jo ale o to tolik nejde jako ze nefunguje dotaz EAN -> book

@hrach
Copy link
Member

hrach commented Jul 18, 2022

Which version? Do you use main only?

@qwerin
Copy link
Contributor Author

qwerin commented Jul 18, 2022

on v4 work, on main not work is buggy

@hrach
Copy link
Member

hrach commented Apr 15, 2023

Thank you very much for the report and test case. Fixing in #620.

@hrach hrach closed this Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants