Hi,

A common requirement that comes up repeatedly is "upsert" operations, i.e.
either insert a record or update the existing one with the same PK, if it
already exists. Many (most?) RDBMS support it, either by implementing SQL
2003's MERGE keyword or via proprietary alternatives [1].

I think it'd be great if there was something like Session#upsert(),
exposing these semantics at the entity level. Perhaps the idea was already
brought up in the past, but I wanted to throw it out in any case.

Any thoughts?

Cheers,

--Gunnar

[1]
https://vladmihalcea.com/how-do-upsert-and-merge-work-in-oracle-sql-server-postgresql-and-mysql/
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to