Attributes default NULL in DB (MySql) [RESOLVED]

Create a table with some varchar default NULL, and a model and a CRUD related to it. If you create a new item leaving the activeTextFields related to the nullable varchar in those fields you won't find "NULL" but blank values.

Don't you think that the framework should leave those fields values NULL and not save into them a blank value?

This is because when those activeTextFields are submitted, they have empty string values instead of NULLs.

Just a note: I also needed some fields to be NULL in the DB instead of an empty string. So i used this in my AR's beforeSafe. Works great.

<?php


if ($this->something==='') $this->something=null;

good solution