deleteFeature error

1283
6
10-05-2016 04:40 AM
IvanBespalov
Regular Contributor

We have a myGeodatabaseFeatureTable joined related with two another tables. I can add, I can edit, but I can't delete feature from this table.

myGeodatabaseFeatureTable.canDelete(featureId); // true

myGeodatabaseFeatureTable.deleteFeature(featureId); // AndroidRuntime: FATAL EXCEPTION

java.lang.RuntimeException: Abort due to constraint violation
at com.esri.core.geodatabase.GeodatabaseFeatureTable.nativeDeleteRows(Native Method)
at com.esri.core.geodatabase.GeodatabaseFeatureTable.deleteFeatures(SourceFile:212)

0 Kudos
6 Replies
AlexanderNohe1
Regular Contributor II

How did you perform the table join?

0 Kudos
IvanBespalov
Regular Contributor

Alexander, sorry for my bad English. Not joined, but related. Related with two another tables.

0 Kudos
AlexanderNohe1
Regular Contributor II

Is this from a relationship class that you made in ArcMap?

IvanBespalov
Regular Contributor

No, database relationship class.

AlexanderNohe1
Regular Contributor II

ibespalov‌ - To test whether this issue is with the relationship class itself or with the Android API, would you open the feature service in ArcMap or ArcGIS Online and try performing the delete there to see if it is successful?

0 Kudos
IvanBespalov
Regular Contributor

We got solution for this problem. Database developer (not me) removed some relations, and now it works. But my question is still opened: why release SDK returns fatal RuntimeException, but not TableException. Why canDelete returns true? Thanks.

0 Kudos