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
2
votes
1 answer

Doctrine ODM with symfony 3.0.*

i'm trying to install the Dotrine ODM bundle but composer returns Your requirements could not be resolved to an installable set of packages. my composer.json file looks like this : "require": { "php": ">=5.5.9", "symfony/symfony":…
LauDem
  • 458
  • 1
  • 6
  • 19
2
votes
1 answer

Doctrine MongoBundle: Most efficient way to import 28k documents

I'm importing 28k documents into a MongoDB using the DoctrineMongoDBBundle (Symfony 2.7.4) by foreach-looping threw the source collection. Although it's working as expected, I was wondering how to optimize the performance. I discovered that…
DaFe4u
  • 75
  • 1
  • 5
2
votes
0 answers

Symfony2 Doctrine MongoDB geoNear fetch records in ascending order on distance

I am trying to list the records which are near to my search location. I am getting proper result. But I want to get the records in ascending order on distance. But I don't have distance property in my document. Please help me how to do this. My in…
Gara
  • 627
  • 4
  • 13
2
votes
2 answers

PHPCR nodes and meta cache override

I am using Symfony CMF, PHPCR and SncRedisBundle. I want to add metadata and nodes caching for PHPCR to SncRedisBundle. For testing purposes, I have modified the loadDoctrine function in the file…
arvind.d
  • 351
  • 2
  • 9
2
votes
1 answer

Change database connection dynamically in doctrine/DoctrineMongoODMModule

I want to connect with multiple databases on different servers in zf2 using doctrine/DoctrineMongoODMModule. How can I achieve this?
Navneet Garg
  • 1,364
  • 12
  • 29
2
votes
1 answer

How to get data from multiple collection in loop

When I try to get data from multiple collections code it is giving me data only from the first collection i.e collections are project_0, project_1, project_2, project_3 for($i = 0; $i <= 3; $i++){ …
Navneet Garg
  • 1,364
  • 12
  • 29
2
votes
1 answer

How to configure Monolog to store logs into MongoDB with Symfony2 and Doctrine

Would it be possible to get a full example of how is it possible to configure Monolog to store its logs into MongoDB using Symfony 2.6 and Doctrine 2?
Francesco Casula
  • 26,184
  • 15
  • 132
  • 131
2
votes
1 answer

Doctrine mongodb between dates

Here is my field im trying to get with doctrine { "_id" : ObjectId("5512f2ae73d151bb528b4589"), "name" : "Strandby-1", "enddate" : ISODate("2015-03-31T22:00:00.000Z"), "startdate" : ISODate("2015-03-24T23:00:00.000Z") } Now Im…
Martin-
  • 876
  • 2
  • 13
  • 30
2
votes
0 answers

Doctrine MongoDB ODM hydrates DBRef instead of Documents

i'm trying to embed a set of EmbedDocument (points on the map) into a Document (a map), simple enough, this is my Document populated with one EmbedDocument { "_id" : ObjectId("54e59f081cf97091020041a9"), "title" : "test", "points" : [ { "_id" :…
ROLO
  • 581
  • 4
  • 13
2
votes
1 answer

How to get a Custom User Provider working in Silex?

I could really use a second pair of eyes. I am attempting to create a custom user provider using Silex's SecurityServiceProvider in conjunction with Doctrine MongoDB ODM, and I keep receiving the following error when attempting to log…
Brett
  • 721
  • 2
  • 10
  • 20
2
votes
1 answer

How do I check that a particular lifecycle event method runs in a Doctrine event subscriber?

I have a preUpdate event hook in an event listener and I want to write a test that just verifies that it gets executed when a particular document is updated. The only documentation I've been able to find about testing anything Doctrine-related was…
beth
  • 1,916
  • 4
  • 23
  • 39
2
votes
1 answer

Doctrine mongoDB get only one field

i have a this document: [_id] => MongoId Object ( [$id] => 542e6f6f10f0ed75138b4567 ) [description] => Lorem... [lat] => 37.5184124 [lng] => 15.015836000000036 [name] => My company [phone] => +4977665556 [photos] => Array ( [0] => Array ( …
smoke89
  • 111
  • 2
  • 6
2
votes
1 answer

How to save date as an object to MongoDB using Doctrine?

When I add new record, date saves as a String: "created_at" : "0.67200000 1407770545" My question is how to save date as an object? I'm expecting to see something like this: "created_at" : ISODate("2013-09-22T07:41:44.451Z"), My code: class…
vim
  • 135
  • 1
  • 8
2
votes
1 answer

Configure Symfony to use multiple mongodb databases

In my application i have to use two different MongoDb databses. So i followed the instruction in the following link.Here is a part of my app/config.yml file doctrine_mongodb: default_database: music_store_database default_connection:…
Hadj Ali Oussama
  • 784
  • 2
  • 8
  • 29
2
votes
1 answer

Change document Namespace from Bundle/Document to Bundle/Model

I'm using DoctrineMongoDBBundle, normally i put the documents into the MyBundle/Document directory and works fine but i want change to MyBundle/Model after move my documents to new namespace i get a error message [Exception] You do not have any…
rkmax
  • 17,633
  • 23
  • 91
  • 176