Hey Jon,

Thanks for help-me. Answering your questions:

a) Looks like you are configuring Entity, what do the classes look
like in that folder?
I'm using the name "Entity" because i'm moving from mysql to mongodb
and i have a lot of things done. So, i' trying to minimize the impact
of this change.


b) Are the mapped to the ODM?
I think so. Take a look:


<?php
namespace App\Bundle\UserBundle\Entity;

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

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

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

    /**
     * @mongodb:Field(type="timestamp")
     */
    protected $lastVisit;
    }

}




thanks :)



On Wed, Mar 23, 2011 at 9:38 PM, Jonathan Wage <[email protected]> wrote:
> Looks like you are configuring Entity, what do the classes look like in that
> folder? Are the mapped to the ODM?
> - Jon
>
> On Tue, Mar 22, 2011 at 10:43 PM, Diego Henrique Oliveira
> <[email protected]> wrote:
>>
>> I am trying to configure MongoDB to work in a different folder from the
>> default and would like to know if the following configuration is correct,
>> because it is not working as it should.
>>
>> # Doctrine Configuration
>> doctrine_mongo_db:
>>     document_managers:
>>         default:
>>             mappings:
>>                 UserBundle: { type: annotation, dir: Entity/ }
>>
>>
>> this is the error that i got:
>>
>> Class App\UserBundle\Entity\User is not a valid document or mapped super
>> class.
>> 500 Internal Server Error - MongoDBException
>>
>>
>> So, anyone can help to find why this configuration is not working?
>>
>>
>> ps.: if i use the default configuration, everything works fine.
>>
>>
>> thanks
>>
>> --
>> 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>
>
>
> --
> Connect with me on http://twitter.com/jwage and http://about.me/jwage to
> keep in touch.
>

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to