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

Check for non-cacheable entities on metadata level, not at runtime #1433

Merged
merged 11 commits into from
Jul 16, 2015

Conversation

goetas
Copy link
Member

@goetas goetas commented Jun 20, 2015

This PR moves the check for non-cacheable entities from "runtime" to metadata definition.

If an entity has an association key as part of its PK, and this association key is not configured to be stored into SLC, an exception it thrown.

The previous approach was checking this constraint at "runtime" (right before saving the value), this PR moves this check at metadata level into (_validateAndCompleteAssociationMapping method).

testQueryNotCacheableAssociationException ther has been removed since this constraint is checked at metadata class loading time

@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-3783

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

@goetas
Copy link
Member Author

goetas commented Jul 16, 2015

Any news /feedback on this?

*
* @return array
*/
public function getAssociationCacheDefaults ($fieldName, array $cache)
Copy link
Member

Choose a reason for hiding this comment

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

Extra space between the function name and open parenthesis

@FabioBatSilva
Copy link
Member

Besides minor CS fixes, looks good for me.

Thanks @goetas

@goetas
Copy link
Member Author

goetas commented Jul 16, 2015

done! thank you for reviewing my code

@Ocramius
Copy link
Member

This is gonna be in 2.6.0, thanks! :-)

@Ocramius Ocramius self-assigned this Jul 16, 2015
Ocramius added a commit that referenced this pull request Jul 16, 2015
Check for non-cacheable entities on metadata level, not at runtime
@Ocramius Ocramius merged commit 506df64 into doctrine:master Jul 16, 2015
@lcobucci lcobucci added this to the 2.6.0 milestone Dec 19, 2017
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