DDC-3304: [EntityGenerator] Embeddables properties and methods are broken #4085

Closed
opened 2026-01-22 14:34:54 +01:00 by admin · 13 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 11, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user phansys:

EntityGenerator creates broken properties for embeddables. Given the example classes exposed in http://docs.doctrine-project.org/en/latest/tutorials/embeddables.html (User, Address), EntityGenerator creates wrong associations in User entity. Instead of this:

/****
 * Address
 *
 * @var Address
 */
private $address;

I get this:

/****
 * Address.street
 *
 * @var string
 */
private $address.street;
/****
 * Address.postalCode
 *
 * @var string
 */
private $address.postalCode;
/****
 * Address.city
 *
 * @var string
 */
private $address.city;
/****
 * Address.country
 *
 * @var string
 */
private $address.country;

And the same for its getters and setters.
I'll try to do a PR when I found a way to solve this.

Originally created by @doctrinebot on GitHub (Sep 11, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user phansys: EntityGenerator creates broken properties for embeddables. Given the example classes exposed in http://docs.doctrine-project.org/en/latest/tutorials/embeddables.html (User, Address), EntityGenerator creates wrong associations in User entity. Instead of this: ``` php /**** * Address * * @var Address */ private $address; ``` I get this: ``` php /**** * Address.street * * @var string */ private $address.street; /**** * Address.postalCode * * @var string */ private $address.postalCode; /**** * Address.city * * @var string */ private $address.city; /**** * Address.country * * @var string */ private $address.country; ``` And the same for its getters and setters. I'll try to do a PR when I found a way to solve this.
admin added the Improvement label 2026-01-22 14:34:54 +01:00
admin closed this issue 2026-01-22 14:34:54 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 11, 2014):

@doctrinebot commented on GitHub (Sep 11, 2014): - depends on [DDC-3307: [GH-1135] [DDC-3304] Add support for embeddables in entity generator](http://www.doctrine-project.org/jira/browse/DDC-3307)
Author
Owner

@doctrinebot commented on GitHub (Sep 11, 2014):

Comment created by @deeky666:

[~phansys] which version of ORM are you using? If you are using latest master, this might be related to PR: https://github.com/doctrine/doctrine2/pull/1105
It looks like it broke the EntityGenerator. Can you confirm?

@doctrinebot commented on GitHub (Sep 11, 2014): Comment created by @deeky666: [~phansys] which version of ORM are you using? If you are using latest master, this might be related to PR: https://github.com/doctrine/doctrine2/pull/1105 It looks like it broke the EntityGenerator. Can you confirm?
Author
Owner

@doctrinebot commented on GitHub (Sep 11, 2014):

Comment created by phansys:

Confirmed @deeky666, on rev d9b43dc649 (d9b43dc649).
Thank you!

@doctrinebot commented on GitHub (Sep 11, 2014): Comment created by phansys: Confirmed @deeky666, on rev d9b43dc6492b163fc46f40c0555e2a7015ef5b68 (https://github.com/doctrine/doctrine2/tree/d9b43dc6492b163fc46f40c0555e2a7015ef5b68). Thank you!
Author
Owner

@doctrinebot commented on GitHub (Sep 11, 2014):

Comment created by phansys:

I've tried with rev 8a3def097f (previous to PR#1105) and the result is the same broken structure.

@doctrinebot commented on GitHub (Sep 11, 2014): Comment created by phansys: I've tried with rev 8a3def097f9ebd773ee298f5611ce8bf7007fa7e (previous to PR#1105) and the result is the same broken structure.
Author
Owner

@doctrinebot commented on GitHub (Sep 11, 2014):

Comment created by @deeky666:

[~phansys] thanks for your feedback. I will see if I have time tomorrow to look into this issue.

@doctrinebot commented on GitHub (Sep 11, 2014): Comment created by @deeky666: [~phansys] thanks for your feedback. I will see if I have time tomorrow to look into this issue.
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2014):

Comment created by @deeky666:

Had a quick look into the issue and recognized that embeddables are not taken into account at all at the moment. Working on a solution...

@doctrinebot commented on GitHub (Sep 12, 2014): Comment created by @deeky666: Had a quick look into the issue and recognized that embeddables are not taken into account at all at the moment. Working on a solution...
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2014):

Comment created by @deeky666:

Patch provided in PR: https://github.com/doctrine/doctrine2/pull/1135

@doctrinebot commented on GitHub (Sep 12, 2014): Comment created by @deeky666: Patch provided in PR: https://github.com/doctrine/doctrine2/pull/1135
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1135] was assigned:
https://github.com/doctrine/doctrine2/pull/1135

@doctrinebot commented on GitHub (Sep 12, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1135] was assigned: https://github.com/doctrine/doctrine2/pull/1135
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1135] was closed:
https://github.com/doctrine/doctrine2/pull/1135

@doctrinebot commented on GitHub (Sep 12, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1135] was closed: https://github.com/doctrine/doctrine2/pull/1135
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2014):

Comment created by @deeky666:

Fixed in commit: f12c311a79

@doctrinebot commented on GitHub (Sep 12, 2014): Comment created by @deeky666: Fixed in commit: https://github.com/doctrine/doctrine2/commit/f12c311a795b69a5f4853b079b3f8ad2c9867181
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2014):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 12, 2014): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Sep 13, 2014):

Comment created by phansys:

Thanks [~deeky666].

@doctrinebot commented on GitHub (Sep 13, 2014): Comment created by phansys: Thanks [~deeky666].
Author
Owner

@doctrinebot commented on GitHub (Oct 19, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1105] was assigned:
https://github.com/doctrine/doctrine2/pull/1105

@doctrinebot commented on GitHub (Oct 19, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1105] was assigned: https://github.com/doctrine/doctrine2/pull/1105
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4085