Doctrine MongoDB ODM
  1. Doctrine MongoDB ODM
  2. MODM-76

I get an error when trying to persist a document

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      This is the error I get:

      get_class() expects parameter 1 to be object, array given.

      Stack Trace:

      #0 [internal function]: {closure}(2, 'get_class() exp...', '/Library/WebSer...', 562, Array)
      #1 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/Persisters/BasicDocumentPersister.php(562): get_class(Array)
      #2 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/Persisters/BasicDocumentPersister.php(545): Doctrine\ODM\MongoDB\Persisters\BasicDocumentPersister->prepareReferencedDocValue(Array, Array)
      #3 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/Persisters/BasicDocumentPersister.php(536): Doctrine\ODM\MongoDB\Persisters\BasicDocumentPersister->prepareValue(Array, Array)
      #4 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/Persisters/BasicDocumentPersister.php(463): Doctrine\ODM\MongoDB\Persisters\BasicDocumentPersister->prepareValue(Array, Array)
      #5 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/Persisters/BasicDocumentPersister.php(209): Doctrine\ODM\MongoDB\Persisters\BasicDocumentPersister->prepareUpdateData(Object(App_Model_Ticket))
      #6 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/UnitOfWork.php(771): Doctrine\ODM\MongoDB\Persisters\BasicDocumentPersister->update(Object(App_Model_Ticket), Array)
      #7 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/UnitOfWork.php(281): Doctrine\ODM\MongoDB\UnitOfWork->executeUpdates(Object(Doctrine\ODM\MongoDB\Mapping\ClassMetadata), Array)
      #8 /Library/WebServer/Documents/ktapi/library/Doctrine/ODM/MongoDB/DocumentManager.php(503): Doctrine\ODM\MongoDB\UnitOfWork->commit(Array)
      #9 /Library/WebServer/Documents/ktmodels/library/App/Model/Service/Dao/Doctrine.php(26): Doctrine\ODM\MongoDB\DocumentManager->flush()
      #10 /Library/WebServer/Documents/ktmodels/library/App/Model/Service/Abstract.php(54): App_Model_Service_Dao_Doctrine->save(Object(App_Model_Ticket))
      #11 /Library/WebServer/Documents/ktmodels/library/App/Model/Abstract.php(215): App_Model_Service_Abstract->save(Object(App_Model_Ticket))
      #12 /Library/WebServer/Documents/ktmodels/library/App/Model/Ticket.php(84): App_Model_Abstract->save()
      #13 /Library/WebServer/Documents/ktapi/application/controllers/TicketController.php(145): App_Model_Ticket->save()
      #14 /Library/WebServer/Documents/ktapi/library/Zend/Controller/Action.php(513): TicketController->putAction()
      #15 /Library/WebServer/Documents/ktapi/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('putAction')
      #16 /Library/WebServer/Documents/ktapi/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
      #17 /Library/WebServer/Documents/ktapi/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
      #18 /Library/WebServer/Documents/ktapi/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
      #19 /Library/WebServer/Documents/ktapi/public/index.php(34): Zend_Application->run()
      #20 {main}
      

      Please tell me how I can be more precise or of more help. Do you need my models for debugging? (I do not want to post them here).

        Activity

        Sebastian Hoitz created issue -
        Sebastian Hoitz made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Blocker [ 1 ]
        Sebastian Hoitz made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Sebastian Hoitz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: