0 votes

Hi all,

I am desperately looking for a way to configure a joinColumn name in e.g. a manyToOne assosiation.

Have a look at the following exported Doctrine2 YAML:

manyToOne:
  parent:
    targetEntity: Serius\SiteBundle\Entity\Page
    inversedBy: children
    joinColumns:
      parent_id:
        name: ParentID <--
        referencedColumnName: PageID

ORM Designer 2 GUI:

Association properties

Field properties

in Feature Request by (250 points)
edited by

Hi, I checked it on my model here and you're right. This value is missing in exported YML. We will fix it for next release.

Thanks, can't wait! ;)

Hi,

I checked D2 documentation but there is no "Name" attribute for JoinColumn element. Only thing we can do is use "column" value (if exists) as name of join-element child.

joinColumns:
  parent_id: <-- This will be ParentID if column value will be filled.
    referencedColumnName: PageID

If you check documentation here: http://docs.doctrine-project.org/en/latest/reference/association-mapping.html#one-to-one-unidirectional you will see that attribute "name" is used only in @annotations and xml format and in YML the "name" attribute is used as name of child element.

Hi Ludek,

Sorry for this late answer (hadn't turned on notifications).

I have checked it out, and yes you are right. I didn't read the documentation, but used trial and error instead to fix my issue. Looks like both methods do work, but the way you're describing it is the official way.

Anyway, the bug is still present in the current version: I filled out the proper column names, but the join columns names are still not exported (but the original attribute's name instead).

By the way, the reason I need it is because I have to create a mapping to an existing database (which I may not change because of applications depending on it).

I would like to see this fixed in an upcoming release (I missed the update of today, sadly). ;-)

Keep up the good work.

Hi Dirk,

we didn't fix or implement any changes for this issue because of missing respond. I re-opened this task and we will implement it.

I understand, no problem at all. ;) Great work.

1 Answer

0 votes
Best answer

This issue was fixed in one of the previous versions of ORM Designer.

by Skipper developer (74.8k points)