CMPUT301F24napkin / napkinfactory

1 stars 2 forks source link

Abs ur key generation method doesn't work #17

Closed antoszko closed 3 weeks ago

antoszko commented 3 weeks ago

ur setting the key of the next item to be the number of docs currently in the db. If you remove any but the last document and then try to create one again, you will overwrite data

antoszko commented 3 weeks ago

@Deenknight

Deenknight commented 3 weeks ago

Ah the code for createEventFragment was mostly just to demonstrate the db working. It will have to be changed in the final product because the Event model will need all fields

Deenknight commented 3 weeks ago

I am going to add a writeData overload method that returns the generated id from firestore. So you can either specify the id and overwrite the data, or let firestore generate it and return it to you.

Deenknight commented 3 weeks ago

19