Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeORM overwrites manually set updatedAt/createdAt #6550

Open
hejkerooo opened this issue Aug 12, 2020 · 3 comments
Open

TypeORM overwrites manually set updatedAt/createdAt #6550

hejkerooo opened this issue Aug 12, 2020 · 3 comments

Comments

@hejkerooo
Copy link

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

await users.save({
        ...user,
        updatedAt: moment().add(5, 'month').toDate(),
      });

In the database updatedAt contains current date not future one

@imnotjames
Copy link
Contributor

imnotjames commented Aug 16, 2020

What is the entity definition like here?

Pretty sure this is expected.

@Esqarrouth
Copy link

There has been a scenario where I would like to manually change the values of updatedAt/createdAt. I couldn't find a way to do this.

Does the framework allow this manual change? Is there a workaround I can use?

@Esqarrouth
Copy link

Nvm it's fixed here: #3271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants