Tags » Hibernate

How to implement a custom basic type using Hibernate UserType

Follow @vlad_mihalcea

Introduction

StackOverflow is a gold mine! Check out this question I bumped into this morning. Basically, our Hibernate user wants a resilient CharacterType… 587 more words

Hibernate

The best way to lazy load entity attributes using JPA and Hibernate

Follow @vlad_mihalcea

Introduction

When fetching an entity, all attributes are going to be loaded as well. This is because every entity attribute is implicitly marked with the… 947 more words

Hibernate

Java Constructor​ Questions

Q1. What is a Constructor in java?
A constructor in java is a special type of method that is used to initialize the object.

Q2. What are the different types of Constructors in Java? 1,263 more words

CONSTRUCTOR

Hibernate Fetch Lazy Child Entities with HQL and Native SQL

In one-to-many or many-to-many relationship, we often configure Hibernate to lazily fetch the children collection for performance reasons by reducing the database join operation and the amount of the data been pulled and transmitted from database to application. 511 more words

Java

The best way to handle the LazyInitializationException

Follow @vlad_mihalcea

Introduction

The LazyInitializationException is undoubtedly one of the most common exceptions you can get when using Hibernate. This article is going to summarize the best and the worst ways of handling lazy associations. 984 more words

Hibernate

Spring Batch - Partitioner, Reader, Processor, Writer, Hibernate and Intellij

In this example, I’d like to apply Spring Batch to handle the below scenario

A. Scenario

  • There are multiple CSV files in a location. Each of them contains ID and Name of Soccer players.
  • 1,008 more words
Java