You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export default class CalendarUncommonDay extends BaseModel {
@column({ isPrimary: true })
public id: number;
@column()
public type: string;
@column.date()
public date: DateTime;
@column()
public comment: string;
@column.dateTime({ autoCreate: true })
public createdAt: DateTime;
@column.dateTime({ autoCreate: true, autoUpdate: true })
public updatedAt: DateTime;
@column.dateTime()
public deletedAt: DateTime;
}
The Field "date" in the table accepts dates without time. If I'm trying to fetch data by "comemnt" and "type" fields, then all is ok, the records creates only once. If I'm adding date field, the records can't be finded then and seeder creates the records twice per run. Why it happens and how to fix it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I have a seeder:
And a model:
The Field "date" in the table accepts dates without time. If I'm trying to fetch data by "comemnt" and "type" fields, then all is ok, the records creates only once. If I'm adding date field, the records can't be finded then and seeder creates the records twice per run. Why it happens and how to fix it?
Beta Was this translation helpful? Give feedback.
All reactions