RB-3.4.3 set('1') fieldtype does not change in fluid mode?

15 views
Skip to first unread message

sah

unread,
May 13, 2013, 7:51:10 AM5/13/13
to redbe...@googlegroups.com
Hi,

after upgrading to RB-3.4.3 from 3.3 i noticed  that a fieldtype of set('1') does not change to e.g. int(11).
Now, if i change the value of such a field to e.g. '6' that change will not reflect, because the fieldtype does not change.
I had to manually change the fieldtype to asure correct values.

I have written a testcase and found out that RB-3.3 did choose set('1') as fieldtype when a bean attribute initially was set to '1' but RB-3.4.4 will use tinyint(1).

Testcase:

$bean = R::dispense('bean');
$bean->val = '1';
R::store($bean);

============

In RB-3.3 will give you a set('1') and a tinyint(1) in RB-3.4.3. If your database was initially generated with RB-3.3 then RB-3.4.3 wont reflect fieldtype changes in fluid mode.

Did i miss something in the Upgrade-Docs?

Cheers,
Stephan

gabor

unread,
May 13, 2013, 4:03:34 PM5/13/13
to redbe...@googlegroups.com

Hi,

From RedBeanPHP 3.4 on SET(1) types are no longer supported.
Therefore RedBeanPHP no longer treats SET(1) columns as 'fluid' (to preserve your data).
Update all fields to tinyint(1) to make them 'fluid' again.

I will update the docs.

Cheers,
Gabor
Reply all
Reply to author
Forward
0 new messages