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

Column mappings failed #335

Open
LinggaAskaEdo opened this issue Nov 3, 2019 · 1 comment
Open

Column mappings failed #335

LinggaAskaEdo opened this issue Nov 3, 2019 · 1 comment

Comments

@LinggaAskaEdo
Copy link

LinggaAskaEdo commented Nov 3, 2019

Based on this docs: https://github.com/aaberg/sql2o/wiki/Column-mappings

  1. Failed mapping when SELECT

Old query: SELECT created_date createdDate, user_id userId, phone FROM mob_user WHERE userId = :userIdParam
Exception: Database error: ORA-00904: "USERID": invalid identifier

But its success when query like this:
New query: SELECT created_date createdDate, user_id userId, phone FROM mob_user WHERE user_id = :userIdParam

  1. Failed mapping when UPDATE

Old query: UPDATE mob_user SET cuid = :cuidParam WHERE user_id = :userIdParam
Exception: - (but field not updated)

But its success when query like this:
New query: UPDATE mob_user SET cuid = :cuidParam WHERE phone = :phoneParam

Can you help me what's wrong??? I see something is wrong with the column using underscore. I'm using sql2o version 1.6.

MAVEN

org.sql2o sql2o 1.6.0
@strogiyotec
Copy link

@LinggaAskaEdo could you extend your context , how your table looks like, how do you execute queries above, what database do you use

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