mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Version attribute does not work when column type is inferred instead of explicitly given #7276
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cttboehme on GitHub (Dec 7, 2023).
Bug Report
Summary
If the
#[Version]attribute is specified a column that has no explicitly given type but rather has its type inferred from the respective PHP type, an error occurs.Current behavior
With the above condition, the follow error occurs:
ErrorHandler: Doctrine\ORM\Mapping\MappingException: Locking type "" (specified in "path1\path2\xxxx", field "version") is not supported by DoctrineHow to reproduce
private int $version;)Expected behavior
The version attribute should work irrespective of how the column type is specified