Skip to content

[DoctrineBridge] Convert values to Rfc4122 before inserting them into the database #38600

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

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

KDederichs
Copy link
Contributor

Q A
Branch? 5.x
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #38599
License MIT

This PR formats the ULID into RFC4211 before inserting it into the database to avoid insertion failure on Postgres due to not recognized formating.

@nicolas-grekas nicolas-grekas changed the title Convert values to Rfc4122 before inserting them into the database [DoctrineBridge] Convert values to Rfc4122 before inserting them into the database Oct 16, 2020
@nicolas-grekas
Copy link
Member

Thank you @KDederichs.

@nicolas-grekas nicolas-grekas merged commit 5ca43b8 into symfony:5.x Oct 16, 2020
fabpot added a commit that referenced this pull request Oct 17, 2020
This PR was merged into the 5.x branch.

Discussion
----------

[DoctrinBridge] make Uid types stricter

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Reviewing #38600 made me realize we don't need to deal with converting strings to db values.
We should only support converting actual `AbstractUid` instances in the DB.
Also, the binary types should *not* extend `GuidType`.

Commits
-------

ba31d0e [DoctrinBridge] make Uid types stricter
@fabpot fabpot mentioned this pull request Oct 28, 2020
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.

[DoctrineBridge] Ulid on Postgres throws error on insert
4 participants