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

sql update and object update #721

Closed
tcwyjno1 opened this issue Apr 27, 2016 · 1 comment
Closed

sql update and object update #721

tcwyjno1 opened this issue Apr 27, 2016 · 1 comment

Comments

@tcwyjno1
Copy link

When I update a mysql data column.
I use two ways.

  1. I use sql like 'update user set email = 'xxx' where id = 1'
    In this way, I found the sql running success and returned success.Then the UI refresh and the table showed nothing changed.But the data in database changed successd.I refresh my UI many times
    and try to print the object that I searched in server side.I found the data was old too!.Only I restart the serve then my UI table will show the right data which I changed use the sql.

2.I use id to get the user object and use orm2's save method to update.It also update the database column successed and the UI refreshed rihgt!

Does anyone know why? It's not a UI cookie issue as the 2nd way to update can success refresh database and UI table

@dxg
Copy link
Collaborator

dxg commented Apr 28, 2016

Please set cache: false. See here.

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

No branches or pull requests

2 participants