korma / Korma

Tasty SQL for Clojure.
http://sqlkorma.com
1.48k stars 222 forks source link

Korma query to jdbc conversion Wrong number of args #362

Open ghost opened 7 years ago

ghost commented 7 years ago

I'm trying to do simple queries like select or insert.. It is a mysql database.

When I try to do something simple like a select * from users (select users)

I get:

ArityException Wrong number of args (4) passed to: jdbc/query clojure.lang.AFn.throwArity (AFn.java:429)

dry run :: SELECT users.id, users.username, users.password, users.first_name, users.last_name, users.title FROM users :: []

Why does ::[] get generated I believe this is causing the issue.

immoh commented 7 years ago

I believe you are using a newer version of clojure/java.jdbc that is not compatible with the latest release of Korma. Check the README how to pin it to a version that works with Korma.

ghost commented 7 years ago

I'm using [org.clojure/java.jdbc "0.3.7"]

immoh commented 7 years ago

Are you sure you don't have newer versio of org.clojure/java.jdbc on classpath? I cannot reproduce this based on this information.

:: [] in the end of logging means there are no query parameters, it is certainly not causing this.

lukehharris commented 7 years ago

btw I had the same issue, making sure i was using the correct versions solved it

venantius commented 6 years ago

I'm going through old issues and trying to clean them up. Has this issue persisted?

If there hasn't been a response to this issue in 2 weeks, I'll close the ticket.