-
MY PROJECTS
-
Recent Posts
- SQL.How can you compare two nullable values safely, and how does IS DISTINCT FROM differ from <>?
- SQL.How are NULL values ordered by ORDER BY, how do defaults differ between databases, and how can you control their placement?
- SQL.How does NULL propagate through arithmetic expressions, and how can COALESCE and NULLIF help handle missing values and division by zero?
- SQL.How does NULL affect join conditions, and why can filtering the right-hand table in WHERE remove unmatched rows from a LEFT JOIN?
- SQL.How do GROUP BY and DISTINCT treat NULL values, even though NULL = NULL evaluates to UNKNOWN?
- SQL.How do aggregate functions handle NULL, and what is the difference between COUNT(*), COUNT(column), and COUNT(DISTINCT column)?
- SQL.How does NULL affect IN and NOT IN, and why can NOT EXISTS be a safer choice when a subquery returns nullable values?
- SQL.How do WHERE, HAVING, and CHECK constraints treat conditions that evaluate to UNKNOWN?
- SQL.Why do column = NULL and column <> NULL not work as expected, and when should you use IS NULL and IS NOT NULL?
- SQL.What is SQL’s three-valued logic (TRUE, FALSE, UNKNOWN), and how do AND, OR, and NOT behave with UNKNOWN?
- ChromeDevTools.Watch all failed requests
- SQL.What are domain types (or constraints on data types), and how do they help enforce data correctness?
- SQL.How does SQL handle comparisons between different data types (for example, string vs number), and why is this dangerous?
- SQL.What is the difference between DATE, TIME, TIMESTAMP, and TIMESTAMPTZ, and which one should be used for business events?
- SQL.How do numeric types like INTEGER, BIGINT, DECIMAL, and FLOAT differ in terms of precision and use cases?
- SQL.What problems can arise from implicit type casting in SQL, and how can it affect indexes?
- SQL.How does NULL differ from 0, an empty string, or FALSE in SQL?
- SQL.What is the difference between CHAR, VARCHAR, and TEXT, and when would you choose each?
- SQL.What is MVCC ?
- SQL.What is AutoVacuum Postgres ?
Categories
- Aptana
- Azure
- C#
- DataSnap
- DBExpress
- Delphi
- Delphi и сети
- Delphi. Язык программирования
- ExtJS
- FastReport
- FireDAC
- FireMonkey
- GIT
- ICS
- IDE
- IIS
- Indy
- InnoSetup
- javascript
- jQuery
- JSON
- LiveBindings
- MSHTML
- MySQL
- PHP
- REST
- Ribbons
- SMS
- SQL инструкции
- SVN
- TRichView
- UniGui
- WebBroker
- WinAPI
- Windows
- Алгоритмы
- Без рубрики
- Деревья
- Ищу ответ
- Компонентостроение
- Мои компоненты
- Начальный уровень
- Обработка исключений
- Парсинг
- Потоки(Threads)
- Регулярные выражения
- Тестирование приложений
Author Archives: Stanislav_Panteleev
Java.Hibernate.Spring.Middle.Self invocation
There is one of the most common (and subtle) pitfalls of Spring’s @Transactional: self-invocation, which can silently break transactional (and other proxy-based) behavior. 🔎 What is self-invocation? It’s when a method in a Spring bean calls another method on the … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Spring.Middle.Self invocation
Java.Hibernate.if we have transactional inside transactional how will it work ?
✅ When you call a @Transactional method from another @Transactional method in the same bean (or same Spring proxy): By default, Spring uses propagation REQUIRED, which means: The inner @Transactional method joins the existing transaction of the outer method. There’s … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.if we have transactional inside transactional how will it work ?
Java.Hibernate.Middle.Examples where batch work and where not
let’s put it all together with two clean, full examples side by side: one where batch fetching works (correct) and one where it doesn’t work (incorrect). I’ll give you them both without extra comments, so you can clearly compare. ✅ … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.Examples where batch work and where not
Java.Hibernate.Middle.What means proxies, when we speak of lazy loading?
when I say “proxies,” I do mean entities, but specifically lazy-loaded entities or collections that Hibernate wraps in a proxy object. Here’s what that means: 🔎 What is a proxy in Hibernate? A proxy is a lightweight placeholder object Hibernate … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.What means proxies, when we speak of lazy loading?
Java.Hibernate.Middle.If i load entity in first level cache and i have 2 level cache, where my entity will live?
✅ What happens when you load an entity? When you fetch an entity with Hibernate (e.g., em.find() or HQL query), the lookup happens in order: 1️⃣ First-level cache (1st-level) — also called the persistence context or session cache: Every open … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.If i load entity in first level cache and i have 2 level cache, where my entity will live?
Java.Hibernate.Middle.When batch will not work ?
🚫 1. Detached entities or closed session Batch fetching works only if multiple lazy proxies are accessed within the same persistence context (i.e., the same open Hibernate Session or JPA EntityManager). If you load entities in one transaction but access … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.When batch will not work ?
Java.Hibernate.Middle.What are batch fetching and how do you enable it?
batch fetching is a great way to avoid the N+1 problem without forcing eager loading. Let’s break it down clearly: 🔎 What is batch fetching? When you use lazy loading, Hibernate loads collections or associated entities on demand — but … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.What are batch fetching and how do you enable it?
Java.Hibernate.Middle.How do you configure fetch type for an association?
You configure the fetch type for an association directly on your entity mapping using the fetch attribute of @OneToOne, @OneToMany, @ManyToOne, or @ManyToMany. Here’s how: ✅ For @OneToOne and @ManyToOne By default, these are EAGER, but you can override: ✅ … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.How do you configure fetch type for an association?
Java.Hibernate.Middle.Dublicating parents when fetch join
🔎 The root cause: how SQL JOINs work with one-to-many Imagine you have: Author (id=1) with 3 Books (Book A, Book B, Book C). When you do a JOIN to get authors and their books: Your SQL result will look … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.Dublicating parents when fetch join
Java.Hibernate.Middle.How can you avoid the N+1 select problem?
✅ 1. Use JOIN FETCH in JPQL/HQL This is the most direct way: This forces Hibernate to fetch authors and their books in one SQL query. ✅ 2. Use EntityGraph (JPA 2.1+) If you want to avoid hard-coding fetch joins … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.How can you avoid the N+1 select problem?