Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Allowed to return null for query_builder#6594
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -202,9 +202,10 @@ query_builder | ||
| Allows you to create a custom query for your choices. See | ||
| :ref:`ref-form-entity-query-builder` for an example. | ||
| The value of this option can either be a ``QueryBuilder`` object,a Closure or ``null``. | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Needs a rebase here when#6596 is merged in 2.8 Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I'll take care of that while merging. | ||
| When using a Closure, you will be passed the ``EntityRepository`` of the entity | ||
| as the only argument and should return a ``QueryBuilder``. | ||
| If you'd like to display a list of empty entries, you can return ``null`` in the closure. | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Unless I'm missing something when Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. When you set the option to Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Why that? The only difference is that it's conditional. ? Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I don't think so (seehttps://github.com/symfony/symfony/pull/13990/files#diff-888009597299c21d535422fd4368bed3R72). Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Ok so I've missed the point of that feature, thanks for the enlightening! Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. @xabbuh Looks likesymfony/symfony@317d30b has not made it to the core !? (neithermaster nor2.8) Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Looks like there was something wrong with the commit and it was fixed insymfony/symfony@eb08baa The tests exists and passes:https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php#L212-L223 Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. | ||
| Overridden Options | ||
| ------------------ | ||