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

Add a new method to use a filter before extracting the metadata #266

Closed

Conversation

nicolasThal
Copy link

Hi

I have notice that, when you use the doctrine:mapping:convert and doctrine:mapping:import command in symfony, the filter is added after all the metadata are extracting from the database.
In this case, when you have a table with no primary key for example, you cannot extract the mapping for only one entity.

I have also made a pull-request into the doctrineBundle and doctrine2 to fix this issue.
doctrine/DoctrineBundle#161
doctrine/orm#603

What are your thought about my issue?

@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/DCOM-184


$driver = $this->getDriver();
$metadata = array();
foreach ($driver->getFilteredClassNames($filter) as $className) {
Copy link
Member

Choose a reason for hiding this comment

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

this method is not part of the Driver interface (and cannot be added as it would be a BC break)

@stof
Copy link
Member

stof commented Mar 20, 2013

This should be closed IMO. the implementation is currently broken as it assumes an extra method on the driver, which is wrong.

To do it right, it would require adding the method in the ClassMetadataFactory interface and updating the MappingDriver interface with a new method. But both changes are BC breaks and so cannot be done until 3.0

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.

None yet

5 participants