Hi,
i need save record to table. I use this php code:
$farm['table_name'] = $this->tableName;
Backendless::$Persistence->->updateBulk($farm, "objectId = '$id'");
If I use dump method on var $farm:
Nette\Utils\ArrayHash #efd9
country => "CZ" (2)
city => "Prague" (5)
postcode => 11000
email => "mail@example.com" (21)
info_cz => "Content" (16)
name => "My Name" (4)
surname => "Your surname" (7)
phone => "123123123" (9)
web => "www.example.com" (15)
street => "Street" (12)
type => 1
location => backendless\model\GeoPoint #30f5
latitude protected => "50.0795375
" (11)
longitude protected => "14.4314003
" (11)
categories protected => array ()
metadata protected => array ()
objectId protected => NULL
table_name => "MyTableName" (5)
Backendless API return error: Unable to search/add geo points. Invalid coordinates. Error code:4002.
Please can you tell me, where is my mistake?
Thank You.
A.
Hi!
Please check if latitude/longitude are numbers.
Also you can use doc examples:
https://backendless.com/documentation/data/php/data_relations_with_geo_points.htm
Latitude/longitude are numbers to be sure, i parsed to (float). But still the same error :-/
Having the same issue here, any Idea whats up?
Hey Sergey,
The thing is, I’m not adding any geopoints.
I have a PHP web service, it fetches a row from an Order table. Order table contains a related 1:1 customer (a User Class). A user class has a 1:M relation with a table called Address. And as you guessed, Address table has a geolocation column (1:1). All the relations have autoload on.
What happens is when I update the Order, I get that 4002 error as mentioned in this post title. If I remove the geolocation from the related Address table, the update goes through just fine.
Why is that happening? Or what am I doing wrong?
note: even the geolocation column in the Address table has an autoload on. I need to have all the above relations mentioned with autoload on as my requirement.
Hey Sergey,
The thing is, I’m not adding any geopoints.
I have a PHP web service, it fetches a row from an Order table. Order table contains a related 1:1 customer (a User Class). A user class has a 1:M relation with a table called Address. And as you guessed, Address table has a geolocation column (1:1). All the relations have autoload on.
What happens is when I update the Order, I get that 4002 error as mentioned in this post title. If I remove the geolocation from the related Address table, the update goes through just fine.
Why is that happening? Or what am I doing wrong?
note: even the geolocation column in the Address table has an autoload on. I need to have all the above relations mentioned with autoload on as my requirement.