Hi Jasper,

Sorry for the delay. I have already tested again and double-checked the
set/get methods and I realized that was missing the setId method, so I
created it and now it`s working fine.

Thank you for all support.


On Tue, Jan 28, 2014 at 10:06 AM, Alberto Viana <[email protected]>wrote:

>
>
>
> On Tue, Jan 28, 2014 at 9:20 AM, Jasper N. Brouwer 
> <[email protected]>wrote:
>
>> > $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?
>>
> It was just a sample.
>
>>
>> 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.
>>
>
>
>
> --
> Alberto Guimarães Viana
> E-mail: [email protected]
> http://blog.albertoviana.com
>
> "Uma pessoa inteligente resolve um problema, um sábio o previne." Albert
> Einstein
>



-- 
Alberto Guimarães Viana
E-mail: [email protected]
http://blog.albertoviana.com

"Uma pessoa inteligente resolve um problema, um sábio o previne." Albert
Einstein

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