Skip to content

Change the doc reference format #504

@n-sviridenko

Description

@n-sviridenko

Currently, the doc reference is an array of the document snapshots which are impossible to query by if needed to filter the entities which are having those.

I.e. I have a collection with candidates:

{
  "name": "John Doe",
  "job": [{"docPath":"jobs/123","snapshot":{"name":"First job"}}]
}

{
  "name": "Bob Darwin",
  "job": [{"docPath":"jobs/243","snapshot":{"name":"Second job"}}]
}

They look user-friendly inside firetable, but I'm unable to query candidates by a specific job, as I have to filter them by the entire object (where('job', 'array-contains', {"docPath":"jobs/243","snapshot":{"name":"Second job"}})) which might change (e.g. I rename the job) while its snapshot will stay same.

The goal is to come up with something I'll be able to filter by.

P.S. How do the other firetable users solve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions