> $sample = $this->getEntityManager()->find(
>     'Sample\Entity\Sample', 2
> );

Shouldn't the entity here be 'Estado\Entity\Cidade' or 
'Endereco\Entity\Endereco'?
Or was this just an example?

The gist looks alright, this setup should work...

You might want to check if all mappings are valid, and the db is in sync:

    $ doctrine orm:schema-tool:validate

And make sure the id you're trying to fetch actually exists :)

-- 
Jasper N. Brouwer
(@jaspernbrouwer)


On 28 Jan 2014, at 11:25, Alberto Viana <[email protected]> wrote:

> Hi Jasper,
> 
> Yes, I did it and you can see the code on the link  
> https://gist.github.com/albertogviana/d5a9508b0213bada3ed7
> 
> On Tue, Jan 28, 2014 at 7:55 AM, Jasper N. Brouwer <[email protected]> 
> wrote:
>> Make sure you map the table-name of all your entities as <schema>.<table>:
>> 
>>     /**
>>      * @Entity
>>      * @Table(name="some_db.some_entity")
>>      */
>>     class SomeEntity
>>     {

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to