Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Model annotations not nullable not working?

I have this annotation setup:

/**
 * @Column(type="string", nullable=true)
 */
public $private_key;

On ->save() I get the following message :

private_key is required

Are nullable and required considered seperate?



84.5k

Maybe the annotations strategy is not correctly set up?



1.8k

I pretty much copied this verbatim:

http://docs.phalconphp.com/en/latest/reference/models.html#annotations-strategy

Was there other config / include / setup needed?



1.8k
Accepted
answer

You were of course correct. I was missing the comment for the class, once added worked fine.

I'm encountering the same problem. The link winmutt gave is dead and all class annotations I tried didn't solve it