8000 DDC-3467: Embeddable in inheritance currently must be protected · Issue #4277 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DDC-3467: Embeddable in inheritance currently must be protected #4277

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

Closed
doctrinebot opened this issue Dec 30, 2014 · 4 comments
Closed

DDC-3467: Embeddable in inheritance currently must be protected #4277

doctrinebot opened this issue Dec 30, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@doctrinebot
Copy link

Jira issue originally created by user nemo64:

I have a setup similar to this one :

/****
 * @ORM\Table()
 * @ORM\Entity(readOnly=true)
 * @ORM\InheritanceType("SINGLE_TABLE")
 ****/
abstract class Planet
{
    /** ... **/
    /****
     * @var Position
     * @ORM\Embedded(class="Position")
     */
    private $position;
}
/****
 * @ORM\Entity(readOnly=true)
 ****/
class Sun extends Planet
{
}

This causes the following error:

[ReflectionException]
Property Sun::$position does not exist

This can easily be fixed by making the embeddable protected, but if I didn't miss anything, a private embed should work too.

@doctrinebot
Copy link
Author

Comment created by @Ocramius:

Can you convert this into a test case? Seems trivial to fix afterwards

@acanimal
Copy link

Any news on this issue?

@lcobucci
Copy link
Member
lcobucci commented Jun 9, 2016

This duplicates #4097 right?
I'll work on a test for it now.

@acanimal
Copy link
acanimal commented Jun 9, 2016

@lcobucci It seems so. Thanks !!!

lcobucci added a commit to lcobucci/doctrine2 that referenced this issue Jun 9, 2016
The `ClassMetadataInfo` was always using the "current class" to
fetch the reflection of a property even when a field is declared
on the parent class (which causes `ReflectionProperty` to throw
an exception).

Fixes doctrine#4097 and doctrine#4277.
@Ocramius Ocramius added this to the 2.5.5 milestone Jun 19, 2016
@Ocramius Ocramius assigned Ocramius and unassigned beberlei Jun 19, 2016
Ocramius added a commit that referenced this issue Jun 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
0