step-up-labs / firebase-database-dotnet

C# library for Firebase Realtime Database.
MIT License
671 stars 170 forks source link

Deleting child throws an error #214

Closed adsonvinicius closed 4 years ago

adsonvinicius commented 4 years ago

I have a simple structure: ROOT

So I tried to delete a node by its value (Token) but raises an error

_await firebase.Child("users").OrderBy("Token").EqualTo("TOKENVALUE").DeleteAsync();

"error": "Exception occured while processing the request.\nUrl: https://myproject.firebaseio.com/users/.json?orderBy=\"Token\"&equalTo=\"TOKEN_VALUE\"&auth=AUTH_KEY\nRequest Data: \nResponse: {\n \"error\" : \"Unsupported operation\"\n}\n" }

When I paste this URL on browser the item I want to delete is shown. However I can't delete it.

By the way await firebase.Child("users").DeleteAsync(); works fine.

bezysoftware commented 4 years ago

As the error says, this isn't supported by firebase. You need to get the keys first and then delete one by one

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

Closing the issue due to inactivity. Feel free to re-open