Files
nomulus/core
gbrodmanandGitHub cb3f2bce47 Add insert+update sort for Hibernate (#3235)
When inserting multiple entities, if sorting isn't enabled, then
Hibernate will just add them in the order received. This is suboptimal
for batch query execution. Hibernate flushes the batch as soon as it
"encounters" a new table, so if we have inserts into tables A, B, A, B
in that order, it'll execute each one separately, rather than batching
(A,A), (B,B).

The downside to enabling ordering is that you need to either have
deferred foreign keys (which we have) or Hibernate-style entity
references, e.g. `@OneToOne Entity entity` rather than `VKey<String>
entityId`.

While any future potential migration to Spanner would require that we
remove the deferred foreign keys, this change is orthogonal to that --
we'll need to change the references to direct Hibernate references
anyway which Hibernate will know how to order properly.
2026-09-17 19:25:07 +00:00
..
2026-04-02 21:23:00 +00:00