Skip to content

Commit

Permalink
Add mention of unique ID customization (#549)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pichot authored and jamesdaniels committed Jun 21, 2018
1 parent 2306be8 commit aff7426
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/saving-and-retrieving-data.md
Expand Up @@ -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
{
Expand Down

0 comments on commit aff7426

Please sign in to comment.