propelorm/Propel — Issue #308: update() and ENUM
Author: drez
Created: 2012-03-05 12:41:13+00:00
State: open

Hi,
I had an issue with the following code. All get and set works fine except that ENUM are not converted to the value set value. In this case, the UPDATE sql query will be `type` = 'sup' and not = '0'. save() works like a charm.

I use MySql, no sqlType.

$e = new Enterprise();
$e->setPrimaryKey($data['IdEnterprise']);
$e->fromArray($data);
if ($e->validate()) {
$q = new EnterpriseQuery();
$q->filterByIdEnterprise($data['IdEnterprise'])
->update($data);

}

Good day,
Fred