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

Empty "SET" in Update #381

Open
bennythomps opened this issue Jun 9, 2017 · 2 comments
Open

Empty "SET" in Update #381

bennythomps opened this issue Jun 9, 2017 · 2 comments

Comments

@bennythomps
Copy link

I have this

(println (k/sql-only (k/update db/account (k/set-fields {:name new-name :password new-password}) (k/where {:id (:id current-user-info)}))))

which results in

UPDATE "account" SET  WHERE ("account"."id" = ?)

What am I doing wrong?

@enragedginger
Copy link

What's your defentity look like for account?

@bennythomps
Copy link
Author

bennythomps commented Jun 9, 2017

Here it is @enragedginger

(defn fix-email-case [{email :email :as acct}]
  (if email
    (assoc acct :email (str/lower-case email))))

(k/defentity account
  (k/entity-fields :id :email :name :password)
  (k/prepare fix-email-case)
  (k/transform fix-email-case)
  (k/has-many token)
  (k/many-to-many kid :permission))

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