Could you check if the documentation mentions this and eventually provide a pull-request for this detail?
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 26 August 2014 17:56, <[email protected]> wrote: > Ok, I was able to do it, but NOT as setting it empty (I has already tried > it, that's why I asked). You have to set it as false (columnPrefix=false). > > If it is empty it goes to the NamingStrategy, which forces: > https://github.com/doctrine/doctrine2/blob/65f8357b46cf247405ca4bb5bf348e0ffc67854b/lib/Doctrine/ORM/Mapping/DefaultNamingStrategy.php#L56-L59 > . > > Terça-feira, 26 de Agosto de 2014 16:46:59 UTC+1, Marco Pivetta escreveu: >> >> As I just stated, you can just set a column prefix. Setting an empty >> prefix gives you the best flexibility, but requires more mapping. >> >> Marco Pivetta >> >> http://twitter.com/Ocramius >> >> http://ocramius.github.com/ >> >> >> On 26 August 2014 17:42, <[email protected]> wrote: >> >>> Thanks. >>> Is there a way of achieving the same (have data mapped to objects), >>> without Doctrine being opinionated and defining this naming convention? >>> Reason being I'd want to implement this in an existing code base. >>> >>> Terça-feira, 26 de Agosto de 2014 16:16:24 UTC+1, Marco Pivetta escreveu: >>> >>>> >>>> On 26 August 2014 17:12, <[email protected]> wrote: >>>> >>>>> Suppose there's a User entity and it is composed of the following >>>>> fields (mapped to value objects in my app): username, email, password. >>>>> >>>>> From what you said, I'd have to change this to username_value (or >>>>> username_username if your config so), email_value, password_value. Is that >>>>> correct? >>>>> >>>> >>>> Correct. The other way around is to define a column prefix: >>>> https://github.com/doctrine/doctrine2/blob/65f8357b46cf24740 >>>> 5ca4bb5bf348e0ffc67854b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php# >>>> L3221-L3231 >>>> >>>> Marco Pivetta >>>> >>>> http://twitter.com/Ocramius >>>> >>>> http://ocramius.github.com/ >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "doctrine-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> >>> Visit this group at http://groups.google.com/group/doctrine-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
