I have the following query
insert into ports (id, un_country, un_location, un_name, un_subdivision, un_status, un_function, un_remarks, coordinate, alternate_names) values ('1', 'AD', 'ALV', 'Andorra la Vella', '', 'AI', '--34-6--', '601', '0x000000000101000000F6285C8FC2F5F43F6666666666264540', '')
It easily works using MySQL CLI or something like Phpstorm db console but once I try to execute it using
DB::table('ports')->insert($values)
for bulk insert I get the
SQLSTATE[22003]: Numeric value out of range: 1416 Cannot get geometry object from data you send to the GEOMETRY field
I'm doing bulk insert and the mentioned $values variable contains an array of arrays imported from csv like
[
'un_country' => "AD"
'un_location' => "ALV"
...
]
All the data is taken from another database with the same settings so out of range error looks a little bit off.
I understand that it might be not even a GEOMETRY problem but something else.
Please help.