0 votes

Hi,

I'm trying to create an "User" entity that extends "FOS\UserBundle\Entity\User". I got two problems:
- There is no option to specify an external mapped superclass (not defined in the skipper model).
- I can't use the same entity name twice (even if they are on different bundles/namespaces).

Anyone have this issue too? Any workarounds?

Thanks!

in Solved by (320 points)

1 Answer

0 votes
Best answer

Unfortunately both of actions you need aren't possible right now. Currently each entity in Skipper has to have a unique name (we have it in our todo list to change this) and all entities have to be available in model.

by Skipper developer (139k points)
selected by

Thanks Ludek,

As workaround, I can include all FOSUserBundle entities in my Skipper model ┬┐can I mark this bundle as not exportable or something like?

You can include any model you need in your project. Currently it's not possible to mark any module as read-only, but you can simply remove "Data Format" and "Relative export path" settings and model will not be exported:

enter image description here

Thanks!

I'll try with this workaround.

The trick works,
I've followed these steps:

  • Create a bundle named "FOSUserBundle"
  • Set the bundle namespace to "FOS\"
  • Set the bundle export data format to "" (avoids export)
  • Create an entity named "UserBundle\Entity\User" without any fields. (avoids entity name conflict in Skipper)
  • Create an entity "User" that inherits from "UserBundle\Entity\User"

Thanks!

I'm glad you have found a solution! Thanks for sharing the guide.