[Solar-talk] table_cols require field
Rodrigo Moraes
rodrigo.moraes at gmail.com
Sun Nov 4 07:35:50 CST 2007
On Nov 4, 2007 10:58 AM, Jeff Surgeson wrote:
> Hi All
>
> If a table field is defined as require in _table_cols in a data model for eg:
>
> 'editor_ipaddr' => array(
> 'type' => 'varchar',
> 'size' => 15,
> 'require' => true,
> ),
>
> should this not automatically trigger a validatateNotBlank validation check on
> save without defining a filter for that col?
It seems that this changed a little bit: 'require' is mainly used to
create the table. Once it is created, the model will consider the
column required if its default value is not NULL (in the database, not
in the model definitions). To make it required *after* the table was
created, you have to manually change your table and set the default
value for the field to NULL.
-- rodrigo
More information about the Solar-talk
mailing list