Skip to content
Back

Android SDK: Kotlin null Value Not Updating Correctly

  • 0
  • 3
  • Android
  • Sites
  • Databases
  • Cloud
25 Aug, 2026, 07:29

Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin null values.

For example:

When I send: backgroundType=SOLID_COLOR, solidColorIndex=3

Appwrite correctly stores and returns: backgroundType=SOLID_COLOR, solidColorIndex=3

So this works fine.

But when I update the same value to null and send: backgroundType=SOLID_COLOR, solidColorIndex=null

Appwrite still returns: backgroundType=SOLID_COLOR, solidColorIndex=3

So it looks like the SDK is not properly handling Kotlin null when updating an existing value.

Interestingly, if I send the string "null" instead of the actual null value, it updates correctly.

Could you please check how the Android SDK handles null values during updates?

Mainly I am doing this with upsert function. But I believe update function will also behave the same.

TL;DR
Issue: Kotlin null value not updating correctly in Android SDK. Solution: None provided.
25 Aug, 2026, 07:41

Yaa one more thing to tell you.. That "null" don't work for integers because in that I get error invalid structure.

For integers I haven't found any solution how to update it to null.

But "null" correctly updates to null for string values and relationship, but null don't work for both string and relationship.

25 Aug, 2026, 10:27

<@743532656767270934> might be simple bug, wanna run an agent on this? πŸ‘€

25 Aug, 2026, 10:45

yes will take a look when back, had some other updates for kotlin sdk

1
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more