Export to ORM does not respect ORM column property for foreign key fields

0 votes
asked Jul 28, 2014 in Solved by Websmurf (170 points)

Got another small question.

When defining a field in an Entity, you can define which database field name should be used in the column ORM properties. This doesn't seem to function for foreign key fields.

I have a Note entity and a User entity:
http://adam.nostradamus.nu/screenshots/Schermafbeelding%202014-07-28%20om%2015.09.25.png

I've set up to use custom table fields on all items using the ORM properties field:
http://adam.nostradamus.nu/screenshots/Schermafbeelding%202014-07-28%20om%2015.10.46.png

This works correctly for all fields, it won't work correctly however for associations:
http://adam.nostradamus.nu/screenshots/Schermafbeelding%202014-07-28%20om%2015.12.53.png
http://adam.nostradamus.nu/screenshots/Schermafbeelding%202014-07-28%20om%2015.13.27.png

I'm getting this file when I export it to ORM:
http://adam.nostradamus.nu/screenshots/Schermafbeelding%202014-07-28%20om%2015.17.05.png

Where I would expect this:
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="notes")
* @ORM\JoinColumn(name="note_created_by", referencedColumnName="id")
*/
private $noteCreatedBy;

Any idea why that's not happening?

commented Jul 28, 2014 by Martin Freki Stradej Skipper developer (74,840 points)

Thank you for reporting this. We have checked the situation and we found out that Skipper incorrectly exports field name instead of column name in the definition of association. We will fix this and I will let you know when the fix is available for download.

commented Jul 28, 2014 by Websmurf (170 points)

Ok, thanks for letting me know.
Will adjust our field names for now until this is resolved

commented Jul 29, 2014 by ludek.vodicka Skipper developer (140,450 points)

Hi, sorry it took so long to get back to you but our build server was overheated in these days and we have to solve additional cooling, which takes us whole day ;-).

Please check beta page: http://support.skipper18.com/402/downloads-skipper-orm-designer-3-beta where you can find updated version with fix for your issue.

Please let us know if this helped.

Please log in or register to answer this question.

...