Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get full Firebase path for model #40

Open
peterwarbo opened this issue Apr 29, 2018 · 1 comment
Open

Get full Firebase path for model #40

peterwarbo opened this issue Apr 29, 2018 · 1 comment

Comments

@peterwarbo
Copy link

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.

@alickbass
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants