Skip to content
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

Added abillity to use metacolumn as indexBy #639

Merged
merged 5 commits into from
May 10, 2013

Conversation

goetas
Copy link
Member

@goetas goetas commented Apr 2, 2013

Added ability to use meta column as indexBy. Useful if association entities is widely used.
Replace #204 PR

@doctrinebot
Copy link

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DDC-2384

@@ -255,5 +255,18 @@ public function testAddNamedNativeQueryResultClass()
$this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $rsm->getDeclaringClass('status'));
$this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $rsm->getDeclaringClass('username'));
}
public function testIndexByMetadataColumn()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix CS - missing newline before this line

@Ocramius
Copy link
Member

Ocramius commented Apr 2, 2013

@goetas except for CS, this looks good to me

@beberlei
Copy link
Member

@goetas in the testcase the indention is weird, and can you add a functional test as well? There is a testcsae which has lots of @group DDC-117 annotations, you can add it there because its related to the assocation identifier thing.

@goetas
Copy link
Member Author

goetas commented Apr 29, 2013

Added more tests

@webdevilopers
Copy link

Sorry for commenting on this closed PR. But a lot of people ask me about this feature recently.
And it looks like having to use the column names of foreign keys has never been documented:

Should an example be added to the docs?

    /**
     * @OneToMany(targetEntity="Stock", mappedBy="market", indexBy="market_id")
     * @var Stock[]
     */
    private $stocks;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants