-
Notifications
You must be signed in to change notification settings - Fork 230
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
executeUpdate() with binded object does not check column mappings #303
Comments
Can you post a sample code? I'm quite sure binding works with inserts and updates too. I think we are using that in production code. |
Table (SQLite):
Model:
Example 1:
It works, the class's field "fieldA" matches with table's column. But the example 2 does not work. Example 2:
I tried to map the column "field_b" to field "fieldB". But it throws the exception bellow.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried execute a insert statement with binded object, I mapped some property to its column, but the error continue (org.sql2o.Sql2oException: Error in executeUpdate, Values not bound to statement). Apparently columns mapping is only used in select statement. Is there some impediment to use it in insert/update too?
conn.createQuery(INSERT).bind(config).executeUpdate().getKey()
The text was updated successfully, but these errors were encountered: