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
3
votes
2 answers

Authentication using Doctrine 2 MongoDbODM Module

I'm trying to set a login(Authentication) using Zend2 and DoctrineODMModule but I am getting an error. I have followed the tutorial to setup the Authentication of Zend2 with doctorineODMModule on github any suggestion what I am doing wrong? or what…
Shahbaz
  • 3,433
  • 1
  • 26
  • 43
3
votes
1 answer

How to annotate sub-documents in Doctrine MongoDB?

I want to implement php classes that should model the following : (Symfony,DoctrineMongoDBBundle) Notification Collection { from { id , fname } , to , sentDate } Member Collection { id , fname , lname , email , phone , regDate , ... } And i want…
ABS
  • 2,626
  • 3
  • 28
  • 44
3
votes
2 answers

Can't install doctrine/mongodb-odm using Composer

Trying to install doctrine/mongodb-odm via Composer I get this: Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. …
Jack Sleight
  • 17,010
  • 6
  • 41
  • 55
3
votes
2 answers

EmbedMany Strings in an MongoDB Document?

I need to have a simple array/collection of strings in my Document, but cannot work out a way to acheive this with Doctrine ODM. This is an example class/document, with $tags needing to be a simple array of strings: namespace…
Rob Holmes
  • 3,768
  • 1
  • 16
  • 19
3
votes
1 answer

ODM: Cannot achieve bi-directional relationship

I have two documents. I am trying to find all papers that are associated to a specific person. The documents are saving in their collections, and a reference is being created from Person to Paper, but not the other way around. /** @ODM\Document…
Nathan
  • 2,941
  • 6
  • 49
  • 80
3
votes
4 answers

Why does recursive submodule update from github fail for DoctrineMongoORMModule?

Is this something I am doing wrong, or a wider bug? If I execute the following git commands in an empty directory: git init git submodule add https://github.com/doctrine/DoctrineMongoODMModule \vendor\DoctrineMongoODMModule git submodule update…
superdweebie
  • 1,576
  • 14
  • 23
2
votes
1 answer

Unique constraint on multiple fields in Doctrine MongoDB ODM in Symfony2

I have found Symfony\Bundle\DoctrineMongoDBBundle\Validator\Constraints\Unique but it seems to be valid only for one field (found in this example: http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/form.html as class annotation). Is there…
Karol Sikora
  • 522
  • 1
  • 4
  • 11
2
votes
3 answers

Doctrine 2 MongoDB get child records of object

i'm using doctrine/mongodb-odm-bundle and i have a problem: I can't get referenced rows from document (or i just don't know how to do this..) i have 2 documents with one-to-many reference like this: first /** *…
2
votes
1 answer

ZendFramework, Doctrine 2 ODM with mongoDB - Hydrator Error

I'm using Zend Framework in combination with Doctrine 2 and mongoDB. So far so good. Now I'm rewriting my custom validation class in order to check if a username already exists in the database. (This code worked fine with ORM and MySQL, but not now…
pvlsgnnks
  • 133
  • 1
  • 8
2
votes
1 answer

Verify if insert was successful in Symfony2/Doctrine/MongoDB

My application is not alerting me to a failed insert when adding a record to a MongoDB collection with a unique index... $dm->flush() ... does not complain. I'm trying to figure out what the array parameter to flush should look like to see if that…
GGGforce
  • 634
  • 1
  • 8
  • 19
2
votes
1 answer

unique index with doctrine mongodb odm

i'm doing a registration system for my site and want to prevent duplicate registrations with the same email address. the declaration of the user class looks like this: /** * @Document */ class User extends BaseEntity { private /** *…
bazo
  • 745
  • 9
  • 26
2
votes
0 answers

API PLATFORM : How to fix deprecation on anonymous ODM document after change api annotation format?

I just change all api annotations in my project to new format. From namespace App\Document\Account; use ApiPlatform\Core\Annotation\ApiFilter; use ApiPlatform\Core\Bridge\Doctrine\MongoDbOdm\Filter\SearchFilter; use…
2
votes
2 answers

Api-platform 2.7 - Unable to generate an IRI for the item of type

I'm facing a problem using Api-platform:2.7. Everything works fine in my application with PHP Attributes and APi resources. However, I find out that when I composer require doctrine/mongodb-odm-bundle, all the POST resources become unusable. my…
Guillaume
  • 319
  • 1
  • 11
2
votes
1 answer

How to get specific document manager in controller?

I configured and two document managers, each document manager responsible for particular DB File location: /config/packages/doctrine_mongodb.yaml doctrine_mongodb: auto_generate_proxy_classes: true auto_generate_hydrator_classes: true …
2
votes
2 answers

MongoDB functional test setup and teardown 10x slower in 4.2 with WiredTiger

I am in the process of upgrading our MongoDBs from 3.4 (using MMAPv1 storage engine) to 4.2 (using WiredTiger). One thing I have encountered that is pretty much a blocker at this point is a serious slowdown of our tests. Long story short (more…
Martin Melka
  • 7,177
  • 16
  • 79
  • 138