Closed michaelspeed closed 4 years ago
Hi,
This is because the 'dob' and 'end' fields are Date's. Unfortunately, Date's are not currently supported if you're using the @field decorator. As they are supported in with the standard firestore sdk, they should also be supported in firestorm, so I'll find a fix.
Right now, you can use the @timestamp decorator, which will uses firestore's Timestamp class.
thanks worked
Hi i'm having this issue too but your solution didn't work for me... Here is my entity:
import { rootCollection, field, timestamp, Entity, ITimestamp } from 'firebase-firestorm/lib';
@rootCollection({
name: 'users'
})
export default class User extends Entity {
@timestamp({
name: 'created_at',
updateOnCreate: true
})
public createdAt!: ITimestamp;
@timestamp({
name: 'modified_at',
updateOnUpdate: true
})
public modifiedAt!: ITimestamp;
@field({ name: 'nom' })
name!: string;
@field({ name: 'prenom' })
firstname!: string;
@field({ name: 'email' })
email!: string;
@field({ name: 'username' })
username!: string;
}
PB: I'm using firestorm 2.0.5
A bit late but had a similar Issue, a fix was to check the Compiler Options
{
"compilerOptions": {
"target": "ES5",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
}
}
i have these entity -
i am querying a collections like this
and this comes up!
any ideas?