From aff7426015077137dd94b95dee2ef43199668ad1 Mon Sep 17 00:00:00 2001 From: Jonathan Pichot Date: Thu, 21 Jun 2018 16:28:53 -0400 Subject: [PATCH] Add mention of unique ID customization (#549) I spent too long looking for how to customize the ID of a Firebase record. Thought it would be helpful for others in the future to have this documented. --- docs/guide/saving-and-retrieving-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/saving-and-retrieving-data.md b/docs/guide/saving-and-retrieving-data.md index 6ed517d6..df791eb3 100644 --- a/docs/guide/saving-and-retrieving-data.md +++ b/docs/guide/saving-and-retrieving-data.md @@ -66,7 +66,7 @@ In our `publishPost` action, we create a new post in the data store with the tit > **Note:** By default Firebase requires users be authenticated before they can read and write to the database. If you have not authenticated your users, you will receive errors . If you want to allow reading/writing to the database from unauthenticated users, check out the [security rules](security-rules.md) section. -EmberFire uses Firebase's `push()` function under the hood, which creates a unique timestamp-based ID for each record that is added to the database. Our data now looks like this: +EmberFire uses Firebase's `push()` function under the hood, which creates a unique timestamp-based ID for each record that is added to the database. (If you require a custom unique ID on your record, include an `id` attribute in your `createRecord` request.) Our data now looks like this: ```json {