I didn't find a way to do it through an annotation, but I've just realized how we can do it by assembling the Parse model.
The parameter name in attribute() and safeAttribute() allows you to specify a custom name for that field.
Example:
@ParseClassName(value = "Person")
class PersonParseModel : ParseObject() {
var name: String by attribute(name = "person_name")
var email: String by attribute(name = "email")
var profileImageUrl: String? by safeAttribute(name = "profile_image")
}
I didn't find a way to do it through an annotation, but I've just realized how we can do it by assembling the Parse model.
The parameter
nameinattribute()andsafeAttribute()allows you to specify a custom name for that field.Example: