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
When using DBField 'MultiEnum?' SS translates this to MySQL set command. MSSQL doesn't have set and doesn't even have Enum, that is why mssql module translates both. Enum works correctly by search for the longest option and then setting the mssql field to varchar(). Since mssql module function set directly returns function enum there is a truncation error because varchar() is not long enough.
Example:
Enum('Apple, Oranges, Mango') => resulting field Varchar(7)
MultiEnum?('Apple, Oranges, Mango') => resulting field Varchar(7) error
I fixed this by bypassing Enum varchar length selection with a value of 255
My fix; Line 1023: $maxLength = 255;
The text was updated successfully, but these errors were encountered:
From http://open.silverstripe.org/ticket/8160
When using DBField 'MultiEnum?' SS translates this to MySQL set command. MSSQL doesn't have set and doesn't even have Enum, that is why mssql module translates both. Enum works correctly by search for the longest option and then setting the mssql field to varchar(). Since mssql module function set directly returns function enum there is a truncation error because varchar() is not long enough.
Example:
Enum('Apple, Oranges, Mango') => resulting field Varchar(7)
MultiEnum?('Apple, Oranges, Mango') => resulting field Varchar(7) error
I fixed this by bypassing Enum varchar length selection with a value of 255
My fix; Line 1023: $maxLength = 255;
The text was updated successfully, but these errors were encountered: