Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Embedded identifier support#16826
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sstok commentedDec 8, 2015
Can you add a test to prevent future regressions? Status: Needs work |
mihai-stancu commentedDec 8, 2015
Sure, will come back with the test for this soon. I just want to make sure there's no counter opinion relating to this (such as "why would you use embedded objects as entity identifiers"). |
mihai-stancu commentedDec 22, 2015
@sstok sorry for the delay, I added the suggested tests. |
fabpot commentedDec 26, 2015
Thank you@mihai-stancu. |
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes#16826).Discussion----------Embedded identifier support| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | none| License | MIT| Doc PR | n/aIf you define your entity identifier using an embeddable class the identifier name will contain period symbols in it such as `id.value` which will generate a syntax error in the DQL lexer because parameter names are not allowed to contain period symbols.Example to reproduce described bug:```php/** *@Orm\Embeddable */class Identifier { /** *@Orm\Column(type="integer") */ protected $value;}/** *@Orm\Entity */class Entity { /** *@Orm\Id@Orm\Embedded(class="Identifier") */ protected $id;}```Commits-------38fdda6 Embedded identifier support
If you define your entity identifier using an embeddable class the identifier name will contain period symbols in it such as
id.valuewhich will generate a syntax error in the DQL lexer because parameter names are not allowed to contain period symbols.Example to reproduce described bug: