Hey Symfony Users,

when trying to persist a Document with MongoDB in the current version
of the Symfony2 Sandbox I receive the following Exception:

"No identifier/primary key specified for Document 'Application
\TestBundle\Document\Test'. Every Document must have an identifier/
primary key."

My document file looks quite easy. I also tried various variation of
syntax (eg. with @mongodb), various index definitions (in the class
annotations, setting the id as index) - none worked. I kept on
receiving the same Exception.

<?php

namespace Application\TestBundle\Document;

/**
 * @Document(collection="test")
 */
class Test
{
    /** @Id */
    protected $id;

    /** @String @Index */
    protected $title;

    /** getters and setters **/
}


Any Idea what my problem could be?

Thanks for helping in advance.

Cheers, Philipp

-- 
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