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

Add failing test with ToOne SL2 association #1301

Closed
wants to merge 1 commit into from

Conversation

bakura10
Copy link
Member

Hi,

This failing test is based on @FabioBatSilva tests here (https://github.com/FabioBatSilva/doctrine2/blob/4f7e71963f5197235fce9f87a56b02bbbba46026/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToOneTest.php).

I've changed the test so that on Token association, there is no @Cache annotation.

The default behaviour would be to Doctrine set a proxy on non-cached association. Instead, it basically creates a "partial" object where any associations without the @Cache is set to null. I'm pretty sure it works the same ManyToOne association too.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-3564

We use Jira to track the state of pull requests and the versions they got
included in.

@goetas
Copy link
Member

goetas commented Feb 11, 2015

@bakura10 Can you try to merge #1113 PR into your branch? At first sight it looks related to something that i was working on....

@bakura10
Copy link
Member Author

Hi @goetas ,

I've merge your PR but the test is still failing, unfortunately :(.

@goetas
Copy link
Member

goetas commented Feb 11, 2015

:(


/**
* @Entity
* @Cache("READ_ONLY")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work with any cache mode. Not having the associations resolve definitely sounds like a bug, no matter the cache mode :)

@goetas
Copy link
Member

goetas commented Feb 11, 2015

@bakura10 See bakura10#1

This should pass tests

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.

5 participants