Q
Q
Quber2014-09-19 17:57:35
symfony
Quber, 2014-09-19 17:57:35

How to specify the NULL field type in the Model entity?

I'm developing on Symfony 2.
There are Entity and Model folders.
In entity it is clear how to make the NULL field.
How to do it in Model?
All fields are listed as

@var string
protected $foo

@var integer
protected $bar

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
Quber, 2014-09-19
@Quber

Understood. In Entity null is written like this:

/**
     * @ORM\Column(nullable=true)
     */
    protected $string;

And in Model it is written in a separate file, which is located in the Resources / config folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question