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

Support fetching entities by aliased name #1181

Conversation

Ocramius
Copy link
Member

See #385 (this PR supersedes it)

The final aim is allowing something like:

$user = $em->find(UserInterface::class, 123);

This PR depends also on doctrine/common#342

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-3385

We use Jira to track the state of pull requests and the versions they got
included in.

@@ -18,6 +18,7 @@
"doctrine/collections": "~1.2",
"doctrine/dbal": ">=2.5-dev,<2.6-dev",
"doctrine/instantiator": "~1.0.1",
"doctrine/common": ">=2.5-dev,<2.6-dev",
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure why this wasn't there: we depend on the package, therefore it must be in the list.

Copy link
Member

Choose a reason for hiding this comment

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

indeed, it must be there

/**
* Retrieve associated ClassMetadata.
*
* @return \Doctrine\ORM\Mapping\ClassMetadataInfo
Copy link
Member

Choose a reason for hiding this comment

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

This actually returns string, no? If so, the description is also wrong here.

@Ocramius Ocramius self-assigned this Nov 11, 2014

$this->evm->dispatchEvent(Events::onClassMetadataNotFound, $eventArgs);

// @todo to be discussed: event is used as a mutable data vector here, which may be undesired.
Copy link
Member Author

Choose a reason for hiding this comment

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

@beberlei I'd like your input on this one if possible

@Ocramius Ocramius force-pushed the feature/#385-support-fetching-entities-by-aliased-name branch from 963d5cd to 06f256b Compare January 13, 2015 19:45
}

/**
* Retrieve associated ClassMetadata.
Copy link
Member

Choose a reason for hiding this comment

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

This description is wrong, isn't it?

@@ -91,6 +92,22 @@ protected function initialize()
/**
* {@inheritDoc}
Copy link
Member

Choose a reason for hiding this comment

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

There is no parent method here as far as I can see. Can you provide a descriptive DocBlock?

Copy link
Member Author

Choose a reason for hiding this comment

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

The method is actually an override as per doctrine/common#342

deeky666 added a commit that referenced this pull request Jan 14, 2015
…entities-by-aliased-name

Support fetching entities by aliased name
@deeky666 deeky666 merged commit 00a8265 into doctrine:master Jan 14, 2015
@Ocramius Ocramius deleted the feature/#385-support-fetching-entities-by-aliased-name branch January 14, 2015 12:55
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.

6 participants