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

small perfomance improvement, doctrine ->find method is optimized for id queries #857

Closed
wants to merge 1 commit into from

Conversation

fran6co
Copy link

@fran6co fran6co commented Nov 7, 2012

The findOneBy method has a performance hit.

@sstok
Copy link

sstok commented Nov 10, 2012

👍

@ghost
Copy link

ghost commented Jun 16, 2013

@stof : any reason not to merge this?

@frne
Copy link

frne commented Oct 30, 2013

IMHO this fixes a bug too

The Doctrine\ODM\CouchDB\DocumentRepository does not find objects queried like this anymore.

Does not work:

\Doctrine\ODM\CouchDB\DocumentRepository::findOneBy(array('id' => $user->getId()));

Works fine:

\Doctrine\ODM\CouchDB\DocumentRepository::find($user->getId());

// tested with doctrine/couchdb-odm-bundle@dev-master and CouchDB 1.4.0

@stof
Copy link
Member

stof commented Oct 30, 2013

@frne This must be reported to the CouchDB ODM team. findOneBy is part of the common interface for Doctrine repositories, so if it does not work anymore, the ODM is buggy

@frne
Copy link

frne commented Oct 30, 2013

@stof Bug tracked in doctrine/couchdb-odm#82

@merk
Copy link
Member

merk commented Dec 9, 2013

Closing as this is an issue with another project.

@merk merk closed this Dec 9, 2013
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