I have this class but when i save it in firestore using firestorm.Collection(User).create(fakeUser()), the fields in the database are the keys of properties of User.
I'd except user document keys are the name passed in option to the @field decorator
const fakeUser = (): User => ({ /** all fields are being populated here by faker library */})
@rootCollection({ name: 'users' })
export default class User extends Entity {
@field({ name: 'nom' })
name!: string;
@field({ name: 'prenom' })
firstName!: string;
@field()
email!: string;
@field({ name: 'my_username' })
userName!: string;
}
I have this class but when i save it in firestore using
firestorm.Collection(User).create(fakeUser())
, the fields in the database are the keys of properties of User. I'd except user document keys are the name passed in option to the @field decorator