Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add 'guid' to list of exception to filter out #17668

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

Closed
wants to merge 3 commits into from
Closed

Conversation

garak
Copy link
Contributor

@garak garak commented Feb 3, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #14583
License MIT
Doc PR none

See #14583 (comment)

garak added a commit to garak/symfony that referenced this pull request Feb 3, 2016
@@ -93,6 +93,13 @@ public function getEntitiesByIds($identifier, array $values)
$values = array_values(array_filter($values, function ($v) {
return (string) $v === (string) (int) $v;
}));
} elseif ('guid' === $metadata->getTypeOfField($identifier)) {
$parameterType = Connection::PARAM_INT_ARRAY;
Copy link
Member

Choose a reason for hiding this comment

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

this is wrong. You should not change this to INT_ARRAY. Uuids are not bindable as integers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm open to suggestions. What should I do?

Copy link
Member

Choose a reason for hiding this comment

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

Well, the binding type should be a string array, not an int array

@xabbuh
Copy link
Member

xabbuh commented Feb 3, 2016

seems to be related to #17488 and #17494

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

I think this one should be closed for the same reasons #17494 was closed as well.

@garak
Copy link
Contributor Author

garak commented Mar 2, 2016

Well, my proposal is similar to the one in #17494, but much simpler: I'd like not to fail due to a common situation. The situation is an Entity type inside a form, where required option is false (or placeholder option is set). In this situation, the guid type fails on Postgres.
I don't mean to add any complex validation, like the referenced issue, just this super-simple one. I don't care about edge cases, database configuration, you name it. I'd just like to get an optional relation working.

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

LGTM now 👍

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

Thank you @garak.

fabpot added a commit that referenced this pull request Mar 2, 2016
This PR was squashed before being merged into the 2.3 branch (closes #17668).

Discussion
----------

add 'guid' to list of exception to filter out

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14583
| License       | MIT
| Doc PR        | none

See #14583 (comment)

Commits
-------

0de86ff add 'guid' to list of exception to filter out
@fabpot fabpot closed this Mar 2, 2016
@fabpot fabpot mentioned this pull request Mar 13, 2016
@garak garak deleted the patch-4 branch March 27, 2020 16:58
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.

6 participants