Skip to content

Commit 4daf996

Browse files
authored
improved wording
1 parent 1c13930 commit 4daf996

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

documentation/guide-jpa.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,20 @@ Information about the relation is stored in a table called `BILL_ORDER` that has
229229

230230
For 1:n relationships this solution has the disadvantage that more joins (in the database system) are needed to get a Bill with all the Orders it refers to. This might have a negative impact on performance so that the solution to store a reference to the Bill row/entity in the Order's table is probably the better solution in most cases.
231231

232-
Note that bidirectional n:m relationships are not allowed for applications based on the devon4j. Instead a third entity has to be introduced, which "represents" the relationship (it has two n:1 relationships).
232+
Note that bidirectional n:m relationships are not allowed for applications based on devon4j. Instead a third entity has to be introduced, which "represents" the relationship (it has two n:1 relationships).
233233

234234
=== Eager vs. Lazy Loading
235235
Using JPA it is possible to use either lazy or eager loading. Eager loading means that for entities retrieved from the database, other entities that are referenced by these entities are also retrieved, whereas lazy loading means that this is only done when they are actually needed, i.e. when the corresponding getter method is invoked.
236236

237-
Application based on the devon are strongly advised to always use lazy loading. The JPA defaults are:
237+
Application based on devon4j are strongly advised to *always use lazy loading*. The JPA defaults are:
238238

239239
* `@OneToMany`: LAZY
240240
* `@ManyToMany`: LAZY
241241
* `@ManyToOne`: EAGER
242242
* `@OneToOne`: EAGER
243243

244-
So at least for `@ManyToOne` and `@OneToOne` you always need to override the default by providing `fetch = FetchType.LAZY`.
244+
So at least for `@ManyToOne` and `@OneToOne` you always need to override the default by providing `fetch = FetchType.LAZY`.
245+
245246
IMPORTANT: Please read the link:guide-jpa-performance.asciidoc[performance guide].
246247

247248
=== Cascading Relationships

0 commit comments

Comments
 (0)