Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity generator doesn't generate values for all supported options #6703

Closed
lcp0578 opened this issue Sep 15, 2017 · 2 comments
Closed

Entity generator doesn't generate values for all supported options #6703

lcp0578 opened this issue Sep 15, 2017 · 2 comments
Assignees
Milestone

Comments

@lcp0578
Copy link

lcp0578 commented Sep 15, 2017

in symfony 3.2.12 , doctrine 2.5, doctrine bundle 1.6

php bin/console doctrine:mapping:import --force KitAdminBundle yml  --filter="UserTest"
Importing mapping information from "default" entity manager
  > writing D:\xampp\htdocs\kitlabs\KitPHP\src\KitAdminBundle/Resources/config/doctrine/UserTest.orm.yml

UserTest.orm.yml

KitAdminBundle\Entity\UserTest:
    type: entity
    table: user_test
    id:
        id:
            type: integer
            nullable: false
            options:
                unsigned: false
            id: true
            generator:
                strategy: IDENTITY
    fields:
        username:
            type: string
            nullable: false
            length: 32
            options:
                fixed: false
        mobile:
            type: string
            nullable: false
            length: 11
            options:
                fixed: true  # this is true

convert annotation

php bin/console doctrine:mapping:convert annotation ./src --filter=UserTest
Processing entity "KitAdminBundle\Entity\UserTest"

UserTest.php

class UserTest
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="username", type="string", length=32, nullable=false)
     */
    private $username;

    /**
     * @var string
     *
     * @ORM\Column(name="mobile", type="string", length=11, nullable=false)
     */
    private $mobile;
}

but @Orm\Column(name="mobile", type="string", length=11, nullable=false) not filxed=true
thx

@lcobucci lcobucci added this to the 2.6.0 milestone Nov 26, 2017
@lcobucci lcobucci added the Bug label Nov 26, 2017
@lcobucci lcobucci self-assigned this Nov 26, 2017
@lcobucci lcobucci changed the title doctrine reverse engineering fields options fixed: true bug Entity generator doesn't generate values for all supported options Nov 26, 2017
@lcobucci lcobucci added Improvement and removed Bug labels Nov 26, 2017
@lcobucci
Copy link
Member

@lcp0578 handled in #6849. It will be available on v2.6.x only.

@lcp0578
Copy link
Author

lcp0578 commented Nov 27, 2017

@lcobucci thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants