DDC-3096: JoinColumn definition does not regard column type with value translation #3871

Closed
doctrinebot opened this Issue Apr 22, 2014 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user razorness:

I made a custom column type for doctrine which converts values between MySQL and PHP.

When I use a field with this column type as JoinColumn in a ManyToOne relation plus the column has a different name than the field, the BasicEntityPersister gets always "null" when he is asking for type of the given column name because he is ascing for given column name and not field name.

Example

Make.php:

/****
 @ORM\Column(name="language_code", type="locale")
 */
private $locale;

Foobar.php

/****
 @ORM\ManyToOne(targetEntity="Make")
 @ORM\JoinColumn(name="make*locale", referencedColumnName="language*code")
 */
private $makes;

The localeType translates between long and short language codes. For exmaple "de" (PHP) to "de_DE" (MySQL).

@doctrinebot

Comment created by @ocramius:

This is not a blocker, as you're really going into custom implementations.

You should probably provide a failing test case to clarify what you are doing

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by razorness:

Fixed in newer Versions.

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.5.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment