DDC-1285: Select by multiple ids #1898

Closed
doctrinebot opened this Issue Jul 22, 2011 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user serge.smertin:

How do you look at adding findByIds(array $ids) to EntityManager and UnitOfWork? This would allow fetching multiple entities from a database at one request and would be very useful for caching - there would be even some kind of IdentityMap kept in memcached or any other caching engine, that supports multiple id retrieval: i've been using sujhjhjch an architecture in multiple projects and it turned out to be very effective. There were two basic methods - findIdsByFilter(array $filter) and findEntitiesByIds(array $ids). The latter one had a caching proxy, replicating entities to a cache storage. If this idea proceeds - I'd be glad to cover it with more details.

This topic on StackOverflow could also help:
http://stackoverflow.com/questions/276709/design-pattern-for-memcached-data-caching

@doctrinebot

Comment created by @guilhermeblanco:

Updating fix version

@doctrinebot

Comment created by @beberlei:

This is implemented on the Repository since 2.1 or 2.2 with findBy(array('id' => array(1, 2, 3, 4, 5));

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment