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

Using batch insert with latest oracle jdbc generate a database error (ora-17144) #478

Open
nolondil opened this issue Jul 30, 2024 · 0 comments

Comments

@nolondil
Copy link

nolondil commented Jul 30, 2024

Version: 4.8.5
Module: quill-jdbc
Database: Oracle
Oracle JDBC version: ojdbc11 23.4.0.24.05

Expected behavior

Using batch insert with liftQuery and database generated value should complete without any exception.

Actual behavior

Trying to do a batch insert will throw the new exception: https://docs.oracle.com/en/error-help/db/ora-17144/?r=23ai

Steps to reproduce the behavior

Any oracle database and simple class such as:

case class A(id: Int)

val as: Seq[A] = _

run(liftQuery(as).foreach(query[A].insert(_).returningGenerated(_.id))) // should insert and return database generated values for ids and not throw the exception at the database level

Workaround

Avoid using the liftQuery for a batch insert with generated values and rely on single insert. But this will add more round trips to the database.
@getquill/maintainers

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

1 participant