<p dir="auto">Hi,</p>
<p dir="auto">I implemented the fix from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="70671501" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/14465" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/14465/hovercard" href="https://github.com/symfony/symfony/pull/14465">#14465</a> into the codebase of my Symfony 2.7.0-BETA1 based appication. Now, the non required filter form choice fields work again an do not provoke form errors, when they are empty.</p>
<p dir="auto">But in the same time, all my required choice fields (representing non nullable database columns) do not validate anymore, when I submit them empty. Insteat I get an SQL error about the missing values for the non nullable fields. Removing the fix again resolves this.</p>
<p dir="auto">See also my comment on the fix itself: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="70671501" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/14465" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/14465/hovercard" href="https://github.com/symfony/symfony/pull/14465#commitcomment-11134487">#14465 (comment)</a></p>
<p dir="auto">I think that's happening only on propel + postgres after <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/webmozart/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/webmozart">@webmozart</a> removed empty/null checks from ChoiceToValueTransformer in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/1d89922782922fe3bcacb09f91e8c3c992d29d3f/hovercard" href="https://github.com/symfony/symfony/commit/1d89922782922fe3bcacb09f91e8c3c992d29d3f"><tt>1d89922</tt></a></p>
<p dir="auto">ModelChoiceList-&gt;getChoicesForValues allows to create Propel query with empty string values which are not accepted, so I'm getting:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unable to execute SELECT statement [SELECT (...) FROM twilio_number WHERE twilio_number.id IN (:p1)] [wrapped: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: &quot;&quot;]"><pre class="notranslate"><code class="notranslate">Unable to execute SELECT statement [SELECT (...) FROM twilio_number WHERE twilio_number.id IN (:p1)] [wrapped: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: ""]
</code></pre></div>
<p dir="auto">the code below (for propel bridge) seems to do the trick, but I'm not sure if I can create PR for the Propel1Bridge repository. Will appreciate any help.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class ModelChoiceList extends ObjectChoiceList

    public function getChoicesForValues(array $values)
    {
        if (empty($values) || empty($first = reset($values))) {
            return array();
        }"><pre class="notranslate"><code class="notranslate">class ModelChoiceList extends ObjectChoiceList

    public function getChoicesForValues(array $values)
    {
        if (empty($values) || empty($first = reset($values))) {
            return array();
        }
</code></pre></div>