CodableFirebase
CodableFirebase copied to clipboard
Get full Firebase path for model
Let's say I have a model that looks like this:
struct Model: Codable {
struct ModelB: Codable {
let intBProperty: Int
}
let Int: intProperty
let modelB: ModelB
}
How can I get the Firebase path to ModelB's int property? For instance "model/modelB/intBProperty" ?
It would be convenient to get the full Firebase path.
Hi! Thanks for asking this question! TBH, I had some similar thoughts some day, but in a lot of scenarios, we don’t really need a full path... For example, if you have collections in Firestore. However, if you really use it a lot, I think it should be a separate library and it could be based on KeyPaths, for example. However, it’s just an initial thought