Questions tagged [doctrine-odm]

Doctrine Object Document Mapper is built for PHP 5.3.2+ and provides transparent persistence between PHP objects and data stores such as MongoDB, CouchDB, OrientDB, and PHPCR.

Doctrine Object Document Mapper is built for PHP 5.3.2+ and provides transparent persistence between PHP objects and data stores such as MongoDB, CouchDB, OrientDB, and PHPCR.

Related links

538 questions
1
vote
1 answer

how to have different classes of the same bundle use different document manager

I have two document manager dm1 and dm2, and a bundle called AcmeBundle, in the bundle, i have quite a few classes, some start with "FirstClass" and some start with "SecondClass" and some other classes. For example i have…
user2810081
  • 589
  • 1
  • 8
  • 27
1
vote
1 answer

Unidirectional many-to-one relation in Doctrine MongoDB ODM without MongoId

I'm trying to port the following Doctrine ORM example to Doctrine ODM.
Naoki
  • 49
  • 6
1
vote
2 answers

Downloading CSV with StreamedResponse stops after several rows

I have a MongoDB collection with a few thousand entries which I would like to download as a CSV file. I have some code which basically does the following; A controller method queries the database using Doctrine ODM for all records. The returned…
Sander Toonen
  • 3,463
  • 35
  • 54
1
vote
1 answer

Strategies with mongodb-odm / handle deleted references

We're using doctrine/mongodb-odm in our project and there is a model with references to another model: @ReferenceMany(targetDocument="Extra", simple=true) When we retrieve the referenced objects it's possible that one of the objects isn't available…
JT2809
  • 11
  • 3
1
vote
2 answers

Symfony + Doctrine ODM "The class was not found in the chain configured namespaces CoreBundle/Document"

I can't find what is causing this issue. I have a bundle called CoreBundle (src/CoreBundle) and there is an Entity directory in it (src/CoreBundle/Entity). The directory stores all the entities. For now there is only User Entity…
Gasim
  • 7,615
  • 14
  • 64
  • 131
1
vote
1 answer

Symfony2 & DoctrineMongoDB ODM: Custom Mapping Types

My problem is the following: I have a mongo database which stores such objects { "name":"Accord Neo", "number_of_photos":"3", "id":"accord_neo", "description":"Very comfortable sofa.", "details": { …
Jack
  • 161
  • 1
  • 5
1
vote
3 answers

MongoDB filter an array field by period (start date, end date) using PHP

I have MongoDB documents with this structure: { _id: 1 dates: [ ISODate ("2015-08-21T22: 00: 00Z") ISODate ("2015-09-27T22: 00: 00Z") ], ... } In my example, we see that the document 1 was…
Y. Frelicot
  • 11
  • 1
  • 3
1
vote
0 answers

How Can I Get _rev field in CouchDB Doctrine. Check if the document has changed

I use Doctrine for my CocuhDb I retrieve My Object by $dm = $this->container->get('doctrine_couchdb.odm.default_document_manager'); $obj = $dm->getRepository("myEntity")->findOneBy(array('title' => 'foo)); I tried with (pseudo-code) for { ..... …
monkeyUser
  • 4,301
  • 7
  • 46
  • 95
1
vote
0 answers

Find condition with collection and hash not working in zf2 with DoctrineMongoODMModule

Using ZF2 DoctrineMongoODMModule my condition is : workflow_settings.assignees.user_id = '50e6c53cf8ae035c1b000001' when insert data with collection property condition not working but if convert in to hash it start working when insert data with hash…
Navneet Garg
  • 1,364
  • 12
  • 29
1
vote
1 answer

Mongo Cursor Could not found

I have a collection name StudentMarks with 20000 records in my MongoDB. I am running a script to update a field in all documents of this collection. I am getting following error after it process 5000 records. I am unable to find out why this is…
Sunil Rawat
  • 709
  • 10
  • 41
1
vote
0 answers

How to switch database in DoctrineMongoODMModule zf2

I want to switch database on run time in zf2 using DoctrineMongoODMModule. Is there any method or way to do that ?
Navneet Garg
  • 1,364
  • 12
  • 29
1
vote
1 answer

How to store a duration with Doctrine ODM

I stored documents which represent events with doctrine. Each $event has an $eventType. Each $eventType has a $duration. For each $event I will only store the $begin but not the end as it can be calculated with the default $duration of its…
sgotre
  • 405
  • 3
  • 18
1
vote
1 answer

How to filter by child value in Symfony PHPCR Query Builder

Trying to build a query in symfony that finds all PHPCR nodes of a certain document type with a given name and filters by the city of its Address child document. $qb->from() ->document('My\Bundle\Document\MyDocument', 'm') …
Daniel
  • 13
  • 4
1
vote
1 answer

Retrieve Documents - filtering

It's possible to simply filter retrieved Documents by using: $dm->findBy(array('field' => 'value')) But I need something a bit more suited to Content Repository specifics. So, is there a way to retrieve Documents (e.g. equivalent to "SELECT ...…
forsberg
  • 1,681
  • 1
  • 21
  • 27
1
vote
1 answer

Doctrine PHPCR - Query on ReferenceOne attribute

I've got a problem with doctrine phpcr and the query builder. Is it possible to do a query on an attribute with ReferenceOne() ? e.g : /** * @PHPCR\ReferenceOne(targetDocument="....\Program") */ private $program; But when I'm trying to build a…
Peekmo
  • 2,843
  • 2
  • 19
  • 25