title: How to make models use defaults in Phalcon PHP Framework?
body: <p>If a table has defaults on certain fields and NULL is not allowed, one would expect the insert script to use those defaults, as MariaDB/MySQL usually does. For example, if the table products has an AI field "id", a required field "name" and two required fields "active" and "featured" which both default to 1, then the query </p>
  
  <pre><code>INSERT INTO products (name) VALUES ('someName');
  </code></pre>
  
  <p>automatically inserts 1 as the value of active and featured. However, when using Phalcon's models like so:</p>
  
  <pre><code>$product = new Products();
  $product-&gt;setName('someName');
  $product-&gt;save();
  </code></pre>
  
  <p>returns validation errors saying "active" and "featured" are required.</p>
  
  <p>Is there a flag I should provide during model generation in order for Phalcon tools to harvest and input the defaults into Model classes, or another way to make Phalcon automatically use defaults if found? Best approach would be just ignoring the fields that weren't set, I reckon. Can I make the models do that?</p>