Hi,
There isn't any 'excluding' of collections/entities. By default hibernate will fetch only the entity, you asked for.
Hibernate can fetch associated entities either 'Lazily' (the collection is fetch, when it is used) or 'Eagerly (the collection is fetched in the time of fetching the 'parent' entity. The fetching strategy can be set either in the mapping file ( fetch = "select" for lazy fetching, and fetch = "join" for egager fetching), or it can be set while creating the query or criteria (criteria.setFetchMode("propertyName", FetchMode.JOIN/FetchMode.SELECT) )
Hope it helps.
_________________ Arguing on the Internet is like running in the Special Olympics.
Even if you win, you’re still retarded. :P
|