You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, thanks a lot for your great work - we've been using the PHP CRUD API happily for quite a while now!
We've just now run into an issue that causes some trouble in one of our projects: we have a MySQL database and use TINYINT columns for some values. We now see that those values get converted into boolean values. - This is caused by the TypeConverterand specifically by the line 'tinyint(1)' => 'boolean', (toJdbc).
In our case, this is not only inconvenient but leads to veritable errors because we use TINYINTs intentionally (we cover more than just two states - i.e. the values can be other integers than just 0 and 1.
Is there a clean way to disable this specific type conversion? (For now, we switch the affected column types from TINYINT to INT - but we think that this conversion might cause trouble in other projects, too, and might be a bit too much of magic under the hood.)
Thanks a lot again!
Cheers,
Andreas
The text was updated successfully, but these errors were encountered:
A reply at lightning speed! -- Yes, I get your point and I agree with you. So, issue closed I guess (in lightning speed, too). :-)
Maybe, though, you could consider adding a hint to the README pointing out that the TINYINT column type is used as a stand-in for the non-existent BOOLEAN type. -- But then, seems that no-one else has had any problem with this.
Thank you for your uplifting reply! I understand your reasoning.
But then, seems that no-one else has had any problem with this.
That is not true, if you search prior (closed) issues.
you could consider adding a hint to the README pointing out that the TINYINT column type is used as a stand-in for the non-existent BOOLEAN type.
Okay, but is that true? You may want to experiment with making the field 'tinyint(2)' instead, which may work around the problem (1 and 2 being the display size, not related to storage).
Hi,
first of all, thanks a lot for your great work - we've been using the PHP CRUD API happily for quite a while now!
We've just now run into an issue that causes some trouble in one of our projects: we have a MySQL database and use TINYINT columns for some values. We now see that those values get converted into boolean values. - This is caused by the
TypeConverter
and specifically by the line'tinyint(1)' => 'boolean',
(toJdbc).In our case, this is not only inconvenient but leads to veritable errors because we use TINYINTs intentionally (we cover more than just two states - i.e. the values can be other integers than just 0 and 1.
Is there a clean way to disable this specific type conversion? (For now, we switch the affected column types from TINYINT to INT - but we think that this conversion might cause trouble in other projects, too, and might be a bit too much of magic under the hood.)
Thanks a lot again!
Cheers,
Andreas
The text was updated successfully, but these errors were encountered: