Pregunta

When creating a new firebase reference using $add() in angularFire it returns a unique reference. Is the uniqueness just within the parent list or is it unique across all lists?

Reason I ask is I seem to have ended up with a duplicate reference in two unassociated lists that I am looking to merge, I cannot merge as the duplicate reference merges two records that should remain separate.

¿Fue útil?

Solución

The $add function internally calls Firebase.push(), which is unique across all paths for a given Firebase instance. These are timestamp-based UUIDs that sort chronologically, and are semi-impossible to obtain a duplicate.

If there are duplicate references in two unassociated lists, then there is more at play here and code that reproduces the error would be necessary to delve any further into the problem.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top