Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

HIBERNATE / CATATAN</>
Hibernate16 Jun 2025

How do I implement auditing using @CreationTimestamp and @UpdateTimestamp?

In Hibernate (or when using JPA with Hibernate), you can use annotations such as @CreationTimestamp and @UpdateTimestamp to handle automatic auditing for fields such as creation time and last updated time. These annotations are commonly used to automatically populate Date or LocalDateTime fields whenever an entity is created or updated. Here’s how you would implement […]

Wayan · 5 menit baca
HIBERNATE / CATATAN</>
Hibernate15 Jun 2025

How do I use @Embeddable and @Embedded classes in Hibernate?

In Hibernate (or JPA in general), the @Embeddable and @Embedded annotations are used to help manage object-relational mapping for complex types (value types) within entities. These annotations allow you to define reusable and nested objects that don’t require their own database table but are saved as part of the owning entity. Here’s how to use […]

Wayan · 5 menit baca
HIBERNATE / CATATAN</>
Hibernate14 Jun 2025

How do I handle lazy vs eager fetching in Hibernate mappings?

In Hibernate (and JPA), fetching strategies (lazy and eager) control how related entities are loaded from the database. Understanding how to use these strategies effectively is essential for optimizing application performance. Here’s what you need to know: 1. Eager Fetching Definition: When a relationship is marked as eager, Hibernate retrieves the related entity or collection […]

Wayan · 4 menit baca
HIBERNATE / CATATAN</>
Hibernate13 Jun 2025

How do I enable and use Hibernate’s second-level cache with EHCache?

To integrate Hibernate’s second-level cache with EHCache, follow these steps: Step 1: Add Dependencies Ensure that you have the required dependencies in your project: For Maven: <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>6.4.4.Final</version> </dependency> <dependency> <groupId>org.ehcache</groupId> <artifactId>ehcache</artifactId> <version>3.10.8</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifac...

Wayan · 4 menit baca
HIBERNATE / CATATAN</>
Hibernate13 Jun 2025

How do I map a one-to-many relationship using Hibernate annotations?

In Hibernate, you can use the @OneToMany and @ManyToOne annotations to map a one-to-many relationship. Below is a step-by-step explanation with an example: Explanation: One-To-Many Side: Use the @OneToMany annotation on the field representing the collection in the parent entity. Typically, this will be a List, Set, or other collection type. Many-To-One Side: Use the […]

Wayan · 3 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.