~/talk

ORM Iinsights - How to Not Hurt Yourself?

Talkat DevConf 2023 · 2023-11-08..11-10· [databases, developer-experience]
links:none on file
slides:none on file

ORM patterns for Java with Hibernate and JPA show concrete pitfalls and fixes: dirty checking keeps a snapshot for every managed entity so dirty checking doubles memory and triggers per-field comparisons on flush; lazy associations easily create N+1 queries unless replaced by join fetch, entity graphs, or controlled batch-size; bidirectional collections cause Cartesian explosions so prefer many‑to‑one plus separate queries; enable optimistic locking with @Version optimistic locking to avoid lost updates; avoid side effects inside transactions; prefer DTO queries, Jooq or Spring Data JDBC for predictable SQL.

AI-written summary · about

  1. 0:00Introduction and disclaimers
  2. 3:42Why ORM pitfalls matter
  3. 5:13Entity states and dirty checking
  4. 18:37Associations and loading strategies
  5. 29:23N+1 query problem explained
  6. 38:07Optimistic locking and aggregates
  7. 41:47Transaction pitfalls and best practices
  8. 44:21Alternatives to Hibernate JPA
  9. 47:40Q&A and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.