I try to create an entity that would represent a user, so I created
the following class in the entity folder and ran the command to
generate it and insert it in DB.

namespace ACME\somethingBundle\Entity;

/**
 * @Entity
 * @Table(name="User")
 */
class User
{
    /**
     * @Id
     * @Column(type="integer")
     * @GeneratedValue
     */
    private $id;

    /**
     * @Column(type="string", length=100)
     */
    private $firstname;

    /**
     * @Column(type="string", length=100)
     */
    private $surname;

    /**
     * @Column(type="string", unique=TRUE, length=100)
     * @validation:Email
     */
    private $email;

    /**
     * @Column(type="string", length=32)
     */
    private $password;

    /**
     * @Column(type="boolean")
     */
    private $isVerified;


    /**
     * Get id
     *
     * @return integer $id
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     *
     * Set Id
     * @param $id
     */
    public function setId($id)
    {
        $this->id;
    }
    [...]
}

and I ran the following command to generate the map and insert the schema in DB
php app\console doctrine:generate:entities somethingBundle
and then
php app\console doctrine:schema:create

But when I look at the structure of my Database, just the ID field has
been created.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to