[Solved] Doctrine2 Annotation Id in a @MappedSupperclass

0 votes
asked Jan 24, 2015 in Solved by ise (730 points)
recategorized Oct 2, 2019 by ludek.vodicka

Using doctrine annotations, writing them manually, I'm able to use an abstract BaseEntity class to add certain fields which are common amoungst a few tables, to help keep my code DRY.

The issue I come accross is that although Doctrine runs fine with the @ORM\Id field in my abstract class, I'm unable to represent this in Skipper.

I'm currently making the abstract BaseEntity a @MappedSupperclass in Skipper. Am I able to use Skipper in this way? It's annoying having to edit my entities every time after I export from Skipper.

EDIT: This is related to the following issue: http://support.skipper18.com/1829/mapped-superclass-forces-duplication-associations-extended

commented Mar 19, 2015 by ludek.vodicka Skipper developer (140,450 points)

Is this issue solved? I think we have worked on something similar some time ago but I'm not sure if it was with you.

commented Oct 10, 2015 by ise (730 points)

I'm unsure exactly. I try to create associations from the child entities and get an error "Cannot create association from entity without primary key".

commented Oct 10, 2015 by ludek.vodicka Skipper developer (140,450 points)

As workaround create redundant ID in child entity. This id will not be exported but helps skipper to create associations.

As I replied you in another question, this is unfortunately current limitation of Skipper.

1 Answer

0 votes
answered Jun 5, 2019 by ise (730 points)
 
Best answer

This is now implemented.

...