Fix orm configuration and readme

This commit is contained in:
ornicar 2011-05-14 18:56:48 -07:00
parent 91b78da714
commit 753af9b485
2 changed files with 5 additions and 2 deletions

View file

@ -248,11 +248,14 @@ Declare that you want a doctrine finder in your configuration:
You can now use the `foq_elastica.finder.website.user` service:
/** var FOQ\ElasticaBundle\Finder\MappedFinder */
$userFinder = $container->get('foq_elastica.finder.website.user');
$finder = $container->get('foq_elastica.finder.website.user');
/** var array of Acme\UserBundle\Entity\User */
$users = $finder->find('bob');
/** var array of Acme\UserBundle\Entity\User limited to 10 results */
$users = $finder->find('bob', 10);
You can even get paginated results!
/** var Zend\Paginator\Paginator */

View file

@ -14,7 +14,7 @@
<argument type="collection" /> <!-- options -->
</service>
<service id="foq_elastica.elastica_to_model_transformer.prototype.orm" class="FOQ\ElasticaBundle\Doctrine\ORM\Transformer" public="false">
<service id="foq_elastica.elastica_to_model_transformer.prototype.orm" class="FOQ\ElasticaBundle\Doctrine\ORM\ElasticaToModelTransformer" public="false">
<argument type="service" id="doctrine.orm.entity_manager" />
<argument /> <!-- model -->
<argument type="collection" /> <!-- options -->