Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 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
@doctrinebot doctrinebot added this to the 2.5.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.