Backendless Support
 
Solved

unique id for the table doesn't work?

I have an object with several fields. One of them is android_id. I set it as unique in the backend, but backend allows to save duplicates.

Expected behaviour: Don't allow to save objects with the same unique id or update object with the same unique id.

Please look at the screenshots

Leave a Comment

Comments (5)

photo
1

What is your app id?

photo
1

8B3C7D86-E56A-3ABB-FFDB-022CB59E6F00

photo
1

When you set the constraints, did you see an error saying there are duplicate records in the table?

The system reports and error and shows that the constraints are set, but that's misleading because in reality they are not set. I removed the constraints for now, please cleanup the table to remove any duplicates and then you will be able to set the constraints.

If you set the constraints AND you see an error popup about a duplicate, the constraint will not work properly. In this case, reload the page and remove the constraints and then go back to removing the duplicates.

photo
1

Thank you for your fast reply.

No, I have no any error message.

I will try your suggestion and write about result.

photo
1

Today I saw an error message on my database editor and removed all duplicates.

Now it works as expected.

photo