question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@DynamicInsert not supported with IDENTITY columns

See original GitHub issue

project.ext.vertxVersion = ‘4.1.2’ project.ext.hibernateVersion = ‘1.0.0.CR9’

Database = (PostgreSQL) 13.2 (Debian 13.2-1.pgdg100+1).

This works fine in hibernateVersion = ‘1.0.0.CR7’. public static <T> T saveOrUpdate(T t){ T entity = DatabaseConfiguration.getSessionFactory() .withTransaction((session,tx) -> session.merge(t)) .toCompletableFuture().join(); return entity; }

javax.persistence.PersistenceException: org.hibernate.HibernateException: java.lang.RuntimeException: Unable to obtain MySQLClient.LAST_INSERTED_ID field

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
andrew-dzakcommented, Sep 6, 2021

@gavinking thanks sure will do that next time in reporting any new issue. Should have added the domain class when reporting this .

0reactions
gavinkingcommented, Sep 6, 2021

I also fixed it so that we won’t get this confusing error message in case of future bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Excluding Auto Generated Identity Column from Insert in ...
It worked because of DynamicUpdate & DynamicInsert annotations, becuase in the case of an update, ID column dont get changed hence not included ......
Read more >
INSERT with identity column doesnt work in PLSQL
Hi Team, I have this table having identity column in it. ... ORA-00947: not enough values ... In the dynamic INSERT .
Read more >
Hibernate - dynamic-insert attribute example - Mkyong.com
The dynamic-insert attribute tells Hibernate whether to include null properties in the SQL INSERT statement. Let explore some examples to ...
Read more >
Chapter 5. Basic O/R Mapping
The dynamic-update and dynamic-insert settings are not inherited by subclasses. ... IDENTITY: supports identity columns in DB2, MySQL, MS SQL Server, ...
Read more >
Topic: Database Dynamic Insert - Boomi Community
Process does not show error but update is not working. Can any one guide on this ... I have table 1 with column...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found