Internal server error again

SDK: Android
App Id: 022289A4-9C7B-C8A9-FFE7-FE5D69A18100
Hello, few days ago i got an error inside backendless console where i can no longer view a table because i got this error:
Internal server error with id 002B796C-60B3-7446-FF54-A2B66D8E0800
This time, i have absolutley no idea how this happened, all i remember is that i set up GeoPoint inside a class called branch, at first i tried to save a geopoint as instructed in the documents, which is setting up a GeoPoint, add the lat and long info, set a category name, i named it “branches”, then i added metadata to the object of branch to set the relation ship, i also added GeoPoint object inside the Branch class, again, same as in the documents, then i ran the save function of the geopoint, save function for the branch too, branch uploaded fine and all, however it didnt add GeoPoint inside the geolocations tap, i thought i had to like do branch.setGeoPoint(geopoint), now after i added that line of code and ran the app, it didnt upload the branch, then i tried to see whats going on inside the branch table, then i got that error, AGAIN (see my other post the other day)
first of all,
Why does this keep happening?

second of all,
How did you fix it, how can i fix it, how can i prevent such thing from happening again?

P.S i asked these questions before in the other post after my problem was resolved, can i have an answer to these? i really appreciate your work and will be thankful if you provide me like why this keeps happening

Another thing is that i found that there is another table affected called restaurant, now when i try to get data through Java api, i get this error

BackendlessFault{ code: ‘Server.Processing’, message: ‘java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: Column ‘geoPoint.CB2C11C1-9B2A-F593-FF55-1261B3426B00’ not found.’ }

i see that this is a bug(?), well to help you a little i remember that i once tried to like save a GeoPoint to a Branch object as stated in the Geolocation docs “Relation with data objects”, i just copied and pasted the exact same code but with my own class object Branch so it was something like this

//Branch also had GeoPoint property
Branch branch= new Branch();
branch.address= "something";
branch.address= "something";
GeoPoint point= new GeoPoint( someLat, someLong);
point.addCategory( "branches" );
point.addMetadata( "branch", branch);
point.Geo.savePoint( branch);

//Save Branch

I also added GeoPoint property inside Branch class, now when i ran this, nothing changed, it didnt add the geopoint for some reason, i checked geolocation tab in console, nothing, but when i check the datatable for Branch class in backendless console, it added GeoPoint property, but as a String

next thing i did was adding this line beneath the above code

branch.addGeoPoint(point);
//Save Branch

and here where i got the error, however after that happened, i checked back geolocation and points i was trying to add showed up

hope this helps you figure out the problem im having

Did you effectively create a circular reference from Geopoint to Branch and then from Branch to Geopoint?

Hi Orsan!

Your app was fixed.
And thank you for steps, we will investigate this use case.
Regards,
Kate.

Hi Orsan,

Could you please also provide your full Branch class?

Thanks for fixing the app, kate

and mark yes its what i tried to do, i tried to assign a relation from geopoint to branch object and from branch to geopoint object that way i think itll be easier for me writing code and make things more compact.

however i did try that again but first i build a branch object, build geopoint object, saved branch object, added relation to branch from geopoint metadata, and added relation geopoint to branch object, tried to update branch again and i got some size error i dont really remember that it exceeded a size limit, and also i sometimes get hashmap error, activity crashes BUT the data will be already saved on backendless, at this point i have no idea what happened exactly here.

but after all thank you for your support, i changed my mind at assigning relations so instead of adding relation from geopoint to branch i will simply use add branch objectid to geopoint metadata for now.

there:

http://pastebin.com/fFmVNmTQ

Orsan, I marked the topic as “Solved”. Try to stay away from creating circular dependencies. They should work, but there may be scenarios when they cause problems.

Alright, Thanks again!