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

Causes SQL errors when only readonly properties are specified #8

Open
mandrewpowers opened this issue Apr 3, 2016 · 2 comments
Open

Comments

@mandrewpowers
Copy link

I marked a property modified as read only in my model and went to test it by executing PUT {"modified": 1} but it threw SQL errors. After enabling DEBUG on the mysql connector I realized it just removed the column set in the statement but then the query was invalid:

loopback:connector:mysql SQL: UPDATEtasksSET WHEREid=?, params: [1]

As you can see there are no columns being SET in between SET and WHERE.

@devonatdomandtom
Copy link

I've created a PR for this. Hopefully it is accepted.

@prochac
Copy link

prochac commented Feb 7, 2018

temporary fix:
Add to model https://github.com/clarkbw/loopback-ds-timestamp-mixin too.
So at least the updateAt property is set.

edit: loopback:connector:postgresql fails too

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

3 participants