Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[generate:doctrine:entity] id column #21

Closed
dbu opened this Issue · 4 comments

3 participants

@dbu

in the dialog, i first specified that i want a field id of type integer. the result was

[Doctrine\ORM\Mapping\MappingException]

Duplicate definition of column 'id' on entity 'Liip\DemoBundle\Entity\Event' in a field or discriminator column mapping.

and no file was created.

The dialog should tell me i can not create a field named id. (Or better ask first if i want my id column named id or something else.)

It would be nice if it would write some file even if its not valid, with a warning on top. As it is, i lost all my work of specifying fields. (Luckily was just playing around)

@stof

This should also be reported on the Doctrine issue tracker as adding the field id is done by the EntityGenerator

@dbu

according to Stof, improving the situation would need to be done in doctrine. for now, the generator could just forbid "id" as field name.
http://www.doctrine-project.org/jira/browse/DDC-1229

@fabpot
Owner

I've added an error message when you try to create a duplicate field:

a1e8ab0

But as @stof mentioned, you should also report it to the Doctrine tracker as it seems weid to hardcode the id column in the EntityGenerator.

@fabpot fabpot closed this
@dbu

amazingly fast! thanks!

the link in my comment above points to the doctrine issue i created after stof's comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.