[Closed] How to edit the location of an Entity in properties

0 votes
asked Apr 18, 2015 in How To & Manuals by chateaux (550 points)
edited Apr 18, 2015 by ludek.vodicka

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!

commented Apr 18, 2015 by ludek.vodicka Skipper developer (140,450 points)

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?

commented Apr 18, 2015 by chateaux (550 points)

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
answered Apr 18, 2015 by ludek.vodicka Skipper developer (140,450 points)
selected Apr 18, 2015 by chateaux
 
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

commented Apr 18, 2015 by chateaux (550 points)

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

commented Apr 18, 2015 by ludek.vodicka Skipper developer (140,450 points)

You're welcome. Great, thanks!

...