DDC-3277: Yaml convert-mapping bug #4057

Closed
opened 2026-01-22 14:34:27 +01:00 by admin · 6 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 27, 2014).

Jira issue originally created by user Kilrogg:

I use yaml mapping in my project for better migration management. For example, I use

    orm:convert-mapping yml ./yml --from-database --namespace="User\Entity\\" --filter="User\Entity\User"

To make yml entites for my User module. In my yml I have smth like this:

      password:
            type: string
            nullable: false
            length: 256
            fixed: false
            comment: ''
        email:
            type: string
            nullable: false
            length: 64
            fixed: false
            comment: ''
        status:
            type: smallint
            nullable: false
            unsigned: false
            comment: ''

I can write a comment to column

         status:
                type: smallint
                nullable: true
                unsigned: false
                comment: '%some comment%'
                column: status

And when I perform migration comment disappears. Here https://github.com/doctrine/migrations/issues/184 I was adviced to use such construction:

    status:
        type: smallint
        nullable: true
        column: status
        options:
            unsigned: false
            comment: '%some comment%'

And It works! But convert-mapping generates wrong code. Does anyone know any way to generate a correct one with convert-mapping?

Originally created by @doctrinebot on GitHub (Aug 27, 2014). Jira issue originally created by user Kilrogg: I use yaml mapping in my project for better migration management. For example, I use ``` orm:convert-mapping yml ./yml --from-database --namespace="User\Entity\\" --filter="User\Entity\User" ``` To make yml entites for my User module. In my yml I have smth like this: ``` password: type: string nullable: false length: 256 fixed: false comment: '' email: type: string nullable: false length: 64 fixed: false comment: '' status: type: smallint nullable: false unsigned: false comment: '' ``` I can write a comment to column ``` status: type: smallint nullable: true unsigned: false comment: '%some comment%' column: status ``` And when I perform migration comment disappears. Here https://github.com/doctrine/migrations/issues/184 I was adviced to use such construction: ``` status: type: smallint nullable: true column: status options: unsigned: false comment: '%some comment%' ``` And It works! But convert-mapping generates wrong code. Does anyone know any way to generate a correct one with convert-mapping?
admin added the Bug label 2026-01-22 14:34:27 +01:00
admin closed this issue 2026-01-22 14:34:27 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 28, 2014):

Comment created by @ocramius:

Seems like [~stof] started working on this: https://github.com/doctrine/doctrine2/pull/1123

@doctrinebot commented on GitHub (Aug 28, 2014): Comment created by @ocramius: Seems like [~stof] started working on this: https://github.com/doctrine/doctrine2/pull/1123
Author
Owner

@doctrinebot commented on GitHub (Aug 29, 2014):

Comment created by Kilrogg:

Thank you very much! Will with feature be available with update through composer?

@doctrinebot commented on GitHub (Aug 29, 2014): Comment created by Kilrogg: Thank you very much! Will with feature be available with update through composer?
Author
Owner

@doctrinebot commented on GitHub (Aug 30, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1123] was assigned:
https://github.com/doctrine/doctrine2/pull/1123

@doctrinebot commented on GitHub (Aug 30, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1123] was assigned: https://github.com/doctrine/doctrine2/pull/1123
Author
Owner

@doctrinebot commented on GitHub (Aug 30, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1123] was closed:
https://github.com/doctrine/doctrine2/pull/1123

@doctrinebot commented on GitHub (Aug 30, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1123] was closed: https://github.com/doctrine/doctrine2/pull/1123
Author
Owner

@doctrinebot commented on GitHub (Sep 1, 2014):

Comment created by @deeky666:

[~Kilrogg] there is no release date scheduled for 2.5 yet. If you want to use the patch you will have to use "dev-master" version in your composer.json

@doctrinebot commented on GitHub (Sep 1, 2014): Comment created by @deeky666: [~Kilrogg] there is no release date scheduled for 2.5 yet. If you want to use the patch you will have to use "dev-master" version in your composer.json
Author
Owner

@Majkl578 commented on GitHub (Sep 11, 2017):

Related PR #1123 was merged.

@Majkl578 commented on GitHub (Sep 11, 2017): Related PR #1123 was merged.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4057