0 votes

I have created the following relationship in skipper and am having trouble getting the annotations of the Entity in user to point to the Entity in Trade.

My User module has a one to many relationship to my Trade module. Now when the annotations are exported, the Users TradeItem annotation attempts to link to TradeItem in the Users folder, like so:

enter image description here

The path is set as: TradeItem rather than: Trade\Entity\TradeItem

I know to get the correct mapping to the TradeItem entity I need to update something in the property editor... I am just not sure which one.

Please advise!

asked in How To & Manuals by (530 points)
edited by

Can you please recapitulate your question? Unfortunately I'm not sure what you're asking.

You're describing some problem with variable naming which was caused by wrong alias you set for this association and which you solved it.

But what do you want to update and why? What do you want to achieve?

Ok -

When I export to ORM, it is creating this:

 * @ORM\OneToMany(targetEntity="TradeItem", mappedBy="user")
private $tradeItem;

When I want:

 * @ORM\OneToMany(targetEntity="Trade/Entity/TradeItem", mappedBy="user")
private $tradeItem;

1 Answer

0 votes
Best answer

Based on your additional comment, what you're looking for is "namespace".

When you enter namespace for your module, all entities will be referred together with namaspace "Trade\Entity\"

You need to fill "namespace" property for the module:

Namespace configuration for Doctrine2 project

answered by Skipper developer (133k points)
selected by

Thanks, I also edited my question to focus on the one questions to avoid confusion.

You're welcome. Great, thanks!