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

Closed
opened 2026-01-22 15:14:58 +01:00 by admin · 2 comments
Owner

Originally created by @lcp0578 on GitHub (Sep 15, 2017).

Originally assigned to: @lcobucci on GitHub.

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

Originally created by @lcp0578 on GitHub (Sep 15, 2017). Originally assigned to: @lcobucci on GitHub. 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
admin added the Improvement label 2026-01-22 15:14:58 +01:00
admin closed this issue 2026-01-22 15:14:58 +01:00
Author
Owner

@lcobucci commented on GitHub (Nov 26, 2017):

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

@lcobucci commented on GitHub (Nov 26, 2017): @lcp0578 handled in #6849. It will be available on `v2.6.x` only.
Author
Owner

@lcp0578 commented on GitHub (Nov 27, 2017):

@lcobucci thx

@lcp0578 commented on GitHub (Nov 27, 2017): @lcobucci thx
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5699