CodableFirebase icon indicating copy to clipboard operation
CodableFirebase copied to clipboard

Exclude some property

Open alibarut opened this issue 4 years ago • 0 comments

Hi,

I want exclude some property in my class while save firebase realtime database. Android equivalent @Exclude annotation. But i am not finded in library exclude feature.

Sample class

class User: Codable {
    var Key: String = ""
    var CompanyName: String = ""

    //Exclude this property
    var MqttServerItem: MqttServer?

    init() {
        MqttServerItem = MqttServer(key: "", name: "")
    }
    init(snapshot: DataSnapshot) {
        initializeVariables(snapshot: snapshot)
    }
}

alibarut avatar May 16 '21 11:05 alibarut