Varga Marcell | 17 Aug 16:21 2011
Picon

[Doctrine] Reverse Engineering - Mapping Exception

Hello!
I'm using Symfony 2.0 standard. (I'm new with Symfony.)
I get a mapping an exception:

[Doctrine\ORM\Mapping\MappingException]
Property "categoryid" in "Category" was already declared, but it must be declared only once

when executing this command:
php app/console doctrine:mapping:convert php ./src/tc/TCNewsBundle/Resources/config/doctrine/metadata/orm --from-database --force

The related part of the database: http://pastebin.com/QQCWQ4Qm

I tried to rename the CategoryId in the Site and in the Hirek table but I get the same error.
I found a similar thread but It's for doctrine 2.1rc: http://groups.google.com/group/doctrine-user/browse_thread/thread/442774a1fbf11156.

Do you have any idea or suggestion to solve this problem?
Thanks for your help in advance!

Marcell Varga


--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Varga Marcell | 18 Aug 09:29 2011
Picon

Re: [Doctrine] Reverse Engineering - Mapping Exception

I found other threads with this question, but they are unanswered too.
(for ex.: http://stackoverflow.com/questions/7045535/symfony2-doctrine2-mapping-from-existing-database-exception )

It's gonna be a bug?

Thx for the answers in advance!

Marcell

2011/8/17 Varga Marcell <eandr2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> <eandr2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hello!
I'm using Symfony 2.0 standard. (I'm new with Symfony.)
I get a mapping an exception:

[Doctrine\ORM\Mapping\MappingException]
Property "categoryid" in "Category" was already declared, but it must be declared only once

when executing this command:
php app/console doctrine:mapping:convert php ./src/tc/TCNewsBundle/Resources/config/doctrine/metadata/orm --from-database --force

The related part of the database: http://pastebin.com/QQCWQ4Qm

I tried to rename the CategoryId in the Site and in the Hirek table but I get the same error.
I found a similar thread but It's for doctrine 2.1rc: http://groups.google.com/group/doctrine-user/browse_thread/thread/442774a1fbf11156.

Do you have any idea or suggestion to solve this problem?
Thanks for your help in advance!

Marcell Varga



--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Varga Marcell | 18 Aug 10:36 2011
Picon

Re: [Doctrine] Reverse Engineering - Mapping Exception

And the reason of the bug: Doctrine don't support primary keys as foreign keys...
Check out the link: http://www.doctrine-project.org/docs/orm/2.0/en/reference/limitations-and-known-issues.html

Marcell

2011/8/18 Varga Marcell <eandr2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> <eandr2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
I found other threads with this question, but they are unanswered too.
(for ex.: http://stackoverflow.com/questions/7045535/symfony2-doctrine2-mapping-from-existing-database-exception )

It's gonna be a bug?

Thx for the answers in advance!

Marcell

2011/8/17 Varga Marcell <eandr2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> <eandr2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hello!
I'm using Symfony 2.0 standard. (I'm new with Symfony.)
I get a mapping an exception:

[Doctrine\ORM\Mapping\MappingException]
Property "categoryid" in "Category" was already declared, but it must be declared only once

when executing this command:
php app/console doctrine:mapping:convert php ./src/tc/TCNewsBundle/Resources/config/doctrine/metadata/orm --from-database --force

The related part of the database: http://pastebin.com/QQCWQ4Qm

I tried to rename the CategoryId in the Site and in the Hirek table but I get the same error.
I found a similar thread but It's for doctrine 2.1rc: http://groups.google.com/group/doctrine-user/browse_thread/thread/442774a1fbf11156.

Do you have any idea or suggestion to solve this problem?
Thanks for your help in advance!

Marcell Varga




--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Christophe COEVOET | 18 Aug 10:52 2011

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

Le 18/08/2011 10:36, Varga Marcell <eandr2@...> a écrit :
> And the reason of the bug: Doctrine don't support primary keys as 
> foreign keys...
> Check out the link: 
> http://www.doctrine-project.org/docs/orm/2.0/en/reference/limitations-and-known-issues.html
>
Symfony2 uses Doctrine 2.1, which supports them.

-- 
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 "Symfony2" group.
To post to this group, send email to symfony2@...
To unsubscribe from this group, send email to
symfony2+unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

Varga Marcell | 18 Aug 10:56 2011
Picon

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

Hmm... In the reverse way too? (When generating schema form the db?)
Marcell

2011/8/18 Christophe COEVOET <stof <at> notk.org>
Le 18/08/2011 10:36, Varga Marcell <eandr2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> a écrit :

And the reason of the bug: Doctrine don't support primary keys as foreign keys...
Check out the link: http://www.doctrine-project.org/docs/orm/2.0/en/reference/limitations-and-known-issues.html

Symfony2 uses Doctrine 2.1, which supports them.

--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
varyamo | 27 Aug 20:10 2011
Picon

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

Same problem here! Did you solve it?

--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Benjamin Eberlei | 28 Aug 11:30 2011
Picon

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

The primary key as foreign key limitation is from the 2.0 manual. You are using 2.1 with symfony, which supports this. Please use the correct manual.

The only problem is that the reverse engineering does not support this. You have to reverse engineer yourself, or write a patch to have Doctrine support this. I would really appreciate it :-)

On Sat, Aug 27, 2011 at 8:10 PM, varyamo <varyamo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Same problem here! Did you solve it?

--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
varyamo | 1 Sep 18:59 2011
Picon

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

I'll try to do the reverse engineer myself then... As I don't think I'd be able to write a patch, hope someone could solve it soon :)

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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Matt Durak | 3 Feb 20:31 2012
Picon

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

Has there been any update on this? I'm trying to convert an existing project to Symfony2 but I couldn't find a way to even partially reverse engineer my database (thus saving me a good amount of time).

--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Carlos J. | 3 Feb 22:11 2012
Picon

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

In the cookbook exist how to make a reverse engineering. With this 
comands:
<console code>
>$ php app/console doctrine:mapping:convert xml
./src/Vendor/Bundle/Resources/config/doctrine/metadata/orm --from-database --force
</console code>
Then:
<console code>
>$ php app/console doctrine:mapping:import YourBundle annotation
>$ php app/console doctrine:generate:entities YourBundle
</console code>

See
http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html

Cheers

El vie 03 feb 2012 14:31:13 CST, Matt Durak escribió:
> Has there been any update on this? I'm trying to convert an existing 
> project to Symfony2 but I couldn't find a way to even partially 
> reverse engineer my database (thus saving me a good amount of time).
>
> -- 
> 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 "Symfony2" group.
> To post to this group, send email to symfony2@...
> To unsubscribe from this group, send email to
> symfony2+unsubscribe@...
> For more options, visit this group at
> http://groups.google.com/group/symfony2?hl=en

Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN
PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com

--

-- 
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 "Symfony2" group.
To post to this group, send email to symfony2@...
To unsubscribe from this group, send email to
symfony2+unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

Matt Durak | 4 Feb 00:34 2012
Picon

Re: Re: [Doctrine] Reverse Engineering - Mapping Exception

Please re-read this thread because that was not helpful...

--
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 "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

Gmane