[PR #1346] Fix: generated IDs are converted to integer #9402

Closed
opened 2026-01-22 16:04:12 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1346

State: closed
Merged: Yes


When I try to use type bigint and @GeneratedValue together, generated value is converted to integer.

See PHP documentation http://php.net/manual/en/language.types.array.php

Strings containing valid integers will be cast to the integer type. E.g. the key "8" will actually be stored under 8. On the other hand "08" will not be cast, as it isn't a valid decimal integer.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1346 **State:** closed **Merged:** Yes --- When I try to use type `bigint` and `@GeneratedValue` together, generated value is converted to integer. See PHP documentation http://php.net/manual/en/language.types.array.php > Strings containing valid integers will be cast to the integer type. E.g. the key "8" will actually be stored under 8. On the other hand "08" will not be cast, as it isn't a valid decimal integer.
admin added the pull-request label 2026-01-22 16:04:12 +01:00
admin closed this issue 2026-01-22 16:04:13 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9402