Le 27/03/2011 16:20, César Hernández a écrit :
I have not been able to understand and correct the problem

I made ​​the following corrections
change the path

MiEmpresa\MiPrimerNOSQLBundle\DataFixtures/ODM
MiEmpresa\MiPrimerNOSQLBundle\DataFixtures/MongoDB


I noticed that the namespace was wrong ...
and now this is the code file

<?php
/**
* User Document
*/
namespace MiEmpresa\MiPrimerNOSQLBundle\Document;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ODM\MongoDB\PersistentCollection;

/**
   @mongodb:Document(collection="Personas")
 */
class Personas
{
    /**
       @mongodb:Id
     */
    protected $id;

    /**
      @mongodb:Field(type="string")
     */
    protected $nombre;

    /**
     * Get id
     *
     * @return integer $id
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set nombre
     *
     * @param string $nombre
     */
    public function setNombre($nombre)
    {
       $this->nombre = $nombre;
    }

    /**
     * Get nombre
     *
     * @return string $nombre
     */
    public function getNombre()
    {
       return $this->nombre;
    }
}

even though I have the problem when I run
php app/console doctrine:mongodb:data:load

PHP Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not found in /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php on line 49

Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not found in /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php on line 49


As I said, you need to use the master branch of the Doctrine Common repository, not the 2.0.x release as this interface is not in the release.

--
Christophe | Stof

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to