Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions documentation/src/main/asciidoc/introduction/Entities.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,14 @@ However, as before, the order of the elements is not persistent.
That is, the collection is a _bag_, not a set.
====

[WARNING]
====
We don't usually map collections with `fetch=EAGER`, since that usually leads to poor performance and fetching of unnecessary data.
But this is especially clear in the case of many-to-many associations.
We don't much employ the word "never" when it comes to object/relational mappings, but here we will:
**never** write `@ManyToMany(fetch=EAGER)` unless you're deliberately looking for trouble.
====

[[collections]]
=== Collections of basic values and embeddable objects

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ default boolean useStreamForLobBinding() {
/**
* The JDBC {@link java.sql.Types type code} used to bind a null boolean value.
*
* @see org.hibernate.cfg.AvailableSettings#PREFERRED_BOOLEAN_JDBC_TYPE
* @see org.hibernate.cfg.MappingSettings#PREFERRED_BOOLEAN_JDBC_TYPE
* @see org.hibernate.dialect.Dialect#getPreferredSqlTypeCodeForBoolean()
*/
default int getPreferredSqlTypeCodeForBoolean() {
Expand All @@ -70,7 +70,7 @@ default int getPreferredSqlTypeCodeForBoolean() {
*
* @return The LOB creator
*
* @see org.hibernate.cfg.AvailableSettings#NON_CONTEXTUAL_LOB_CREATION
* @see org.hibernate.cfg.JdbcSettings#NON_CONTEXTUAL_LOB_CREATION
* @see org.hibernate.dialect.Dialect#getDefaultNonContextualLobCreation()
*/
default LobCreator getLobCreator() {
Expand Down Expand Up @@ -98,7 +98,7 @@ default LobCreator getLobCreator() {
*
* @return the JDBC {@link TimeZone}, or null if no JDBC timezone was explicitly set
*
* @see org.hibernate.cfg.AvailableSettings#JDBC_TIME_ZONE
* @see org.hibernate.cfg.JdbcSettings#JDBC_TIME_ZONE
*/
default TimeZone getJdbcTimeZone() {
return getSessionFactory().getSessionFactoryOptions().getJdbcTimeZone();
Expand Down
Loading