Hibernate 6 Shared schema MultitenancyShared schema (or row-level) multitenancy means that the data of all tenants is stored in one database (schema). Depending on your use case this might be OK or totally unacceptable due to for example data protection concerns. It is harder to delete a...Apr 8, 2025 · 3 min readrobertniestroj.hashnode.dev
Two reasons why you might want to disable Open Session in View in a Spring applicationOpen Session in View is a mechanism in Spring Boot which opens a Hibernate Session when processing a HTTP Request in @RestController and closes it when the processing of the request is over. The advantage of this mechanism is that it allows you to tr...Dec 12, 2024 · 5 min readrobertniestroj.hashnode.dev
A Guide to Logging SQL Queries in Hibernateshow-sql=true show-sql is the basic option in Hibernate to display the generated SQL Statements. It does print the statements to the console, so it is only a viable option if you analyze the output generated by Hibernate on a developer machine in an ...Oct 22, 2024 · 6 min readrobertniestroj.hashnode.dev
How JPA works from your Java code to the DatabaseA question I like to ask developers during job interviews is how JPA works from application code down to the database. The answer tells me how someone understands this complex tech stack. As I work with the Spring Framework I ask this question in the...1ASep 24, 2024 · 4 min readrobertniestroj.hashnode.dev
Think twice before using @OneToMany@OneToMany is one of the most often used annotations in #JPA. Whenever a Parent Entity can have multiple Childs we use a Collection with the @OneToMany annotation. import javax.persistence.*; import java.util.HashSet; import java.util.Set; import org...Jul 3, 2024 · 3 min readrobertniestroj.hashnode.dev