Eugen Martynov
Eugen Martynov

Reputation: 20130

Saving property with java keyword as name with Realm

We currently save the next class in Realm:

open class Location(
  var lat: Double? = 0.0,
  var long: Double? = 0.0
) : RealmObject() 

The strange behaviour I see that after saving negative longitude we retrieve it from Realm as 0.0.

Any clue, thoughts or it is impossible?

Upvotes: 1

Views: 61

Answers (1)

Eugen Martynov
Eugen Martynov

Reputation: 20130

After debugging it turns out the Realm issue - long is probably a keyword for schema or so. Please follow https://github.com/realm/realm-java/issues/7492 if you're interested.

Upvotes: 1

Related Questions