Skip to content

Commit 7da080f

Browse files
Child-side parent association via proxy
1 parent 307d465 commit 7da080f

File tree

1 file changed

+1
-1
lines changed
  • HibernateSpringBootPopulatingChildViaProxy

1 file changed

+1
-1
lines changed

HibernateSpringBootPopulatingChildViaProxy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
**[How To Populate a Child-Side Parent Association via Proxy](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootPopulatingChildViaProxy)**
33

4-
**Description:** A proxy can be useful when a child entity can be persisted with a reference to its parent (`@ManyToOne` or `@OneToOne` association). In such cases, fetching the parent entity from the database (execute the `SELECT` statement) is a performance penalty and a pointless action, becase Hibernate can set the underlying foreign key value for an uninitialized proxy.
4+
**Description:** A Hibernate proxy can be useful when a child entity can be persisted with a reference to its parent (`@ManyToOne` or `@OneToOne` association). In such cases, fetching the parent entity from the database (execute the `SELECT` statement) is a performance penalty and a pointless action, because Hibernate can set the underlying foreign key value for an uninitialized proxy.
55

66
**Key points:**
77
- rely on `EntityManager#getReference()`

0 commit comments

Comments
 (0)