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

Insert returning on MS SQL Server in SnakeCase mode returns OUTPUT i_n_s_e_r_t_e_d.id #1768

Closed
easel opened this issue Jan 19, 2020 · 1 comment · Fixed by #1867
Closed

Comments

@easel
Copy link

@easel easel commented Jan 19, 2020

Scala 2.11
MS SQL Server 2017
"io.getquill"             %% "quill-jdbc"       % "3.5.0"
"com.microsoft.sqlserver" % "mssql-jdbc"        % "7.4.1.jre8"

Expected behavior

Generated sql from

          quote {
            collections
              .insert(_.source_id -> lift(source.id.id), _.name -> lift(name))
              .returningGenerated(_.id)
          }

should be INSERT INTO tip.collections (source_id, name) OUTPUT INSERTED.id

Actual behavior

INSERT INTO tip.collections (source_id, name) OUTPUT i_n_s_e_r_t_e_d.id

Workaround

Don't use SnakeCase mode.

@getquill/maintainers

@easel easel changed the title Insert returning on MS SQL Server returns OUTPUT i_n_s_e_r_t_e_d.id Insert returning on MS SQL Server in SnakeCase mode returns OUTPUT i_n_s_e_r_t_e_d.id Jan 19, 2020
@easel
Copy link
Author

@easel easel commented Jan 19, 2020

Switching to SqlServerJdbcContext[Literal.type] fixes it right up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant