Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:41:35+00:00 2026-05-25T18:41:35+00:00

I use Doctrine 2 ODM\MongoDB (this and dependencies all latest from GIT) + PHP

  • 0

I use Doctrine 2 ODM\MongoDB (this and dependencies all latest from GIT) + PHP Mongo extension (v1.1.4) + Mongo (v1.8.3 x64 latest)

In several cases it happens that when I change an entity, it does not get updated

In an embedded entity I have a back reference to it’s parent, to solve http://groups.google.com/group/doctrine-dev/browse_thread/thread/016422b2cc9dcec9?pli=1 (How to get parent document inside embedded document?) without using internal functionalities like UnitOfWork – this MAY or MAY NOT be relevant, I do not know… I would hope that not (my question whether it could went unanswered on the IRC so far)

However a single change in one of Character’s embedded documents triggers these queries (should really be relevant only to it, there’s been flush before it and a condition inside the logger on the flag that was set again right before the change)

Logger dump:

array(6) {
   "update" => TRUE
   "query" => array(1) {
      "_id" => MongoId(1) {
         "$id" => "4e3143be662c32400d000006" (24)
      }
   }
   "newObj" => array(1) {
      "$set" => array(2) {
         "components.destructible.hp" => 99.28706276
         "options.character" => array(3) {
            "$ref" => "characters" (10)
            "$id" => MongoId(1) { ... }
            "$db" => "nuclearRain" (11)
         }
      }
   }
   "options" => array(0) 
   "db" => "someDB" (11)
   "collection" => "characters" (10)
}
array(6) {
   "update" => TRUE
   "query" => array(1) {
      "_id" => MongoId(1) {
         "$id" => "4e553306662c32680800054b" (24)
      }
   }
   "newObj" => array(1) {
      "$set" => array(1) {
         "createdBy" => array(3) {
            "$ref" => "characters" (10)
            "$id" => MongoId(1) { ... }
            "$db" => "nuclearRain" (11)
         }
      }
   }
   "options" => array(0) 
   "db" => "someDB" (11)
   "collection" => "worlds" (6)
}
array(6) {
   "update" => TRUE
   "query" => array(1) {
      "_id" => MongoId(1) {
         "$id" => "4e553306662c32680800054c" (24)
      }
   }
   "newObj" => array(1) {
      "$set" => array(1) {
         "world" => array(3) {
            "$ref" => "worlds" (6)
            "$id" => MongoId(1) { ... }
            "$db" => "nuclearRain" (11)
         }
      }
   }
   "options" => array(0) 
   "db" => "someDB" (11)
   "collection" => "games" (5)
}

Initialization code: http://pastebin.com/1dKagqry

“components.destructible.hp” => 99.28706276 is the core part -> yet this change is never reflected in the DB

  • there is no php error/exception triggered
  • mongo’s log shows no errors
  • generally the Mongo and Doctrine\ODM\Mongo runs fine, entities get persisted, updated, deleted…

Where can I search further or what can I do to solve this issue
Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:41:36+00:00Added an answer on May 25, 2026 at 6:41 pm

    It is awkward, but the issue is that I wanted the EmbeddedDocuments indexed (like associative array)… this was however done on an actual Doctrine-maintained property, so it triggered re-pushing the EmbeddedDocument, discarding the changes

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my code: // my article fixture <?php namespace My\BlogBundle\DataFixtures\ORM; use Doctrine\Common\DataFixtures\AbstractFixture; use
I have these namespaces defined in my bootstrap file: use Doctrine\Common\ClassLoader, Doctrine\Common\Annotations\AnnotationReader, Doctrine\ODM\MongoDB\DocumentManager, Doctrine\ODM\MongoDB\Mongo,
in windows, to use doctrine CLI from any directory i need to use something
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal
I have 4 entities : Country, Region, Province, Town. <?php namespace Entities; use Doctrine\Common\Collections\ArrayCollection;
I'm getting this error on my production environnent: (from prod.log) [2012-01-30 17:00:51] request.CRITICAL: Doctrine\ORM\Mapping\MappingException:
When I use Doctrine to generate classes from Yaml/db each Base class (which includes
I have an object that has an instance of Doctrine\ODM\MongoDB\Query\Builder . When I serialize
I want to use Doctrine DBAL , I downloaded the DBAL folder from a
Using Symfony2 and Doctrine ODM with MongoDB, I need to access the parent document

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.