As with many hibernate features, to figure out exactly what it means you have to read the entire ref docs, and lots of sample code. From refdocs section 6.1.2:
Quote:
default-lazy (optional - defaults to true): The default value for unspecifed lazy attributes of class and collection mappings.
So all it does it set lazy="true" anywhere that allows a lazy="" attribute but doesn't have one.
From refdocs section 20.1.2:
Quote:
The fetch strategy defined in the mapping document affects:
* retrieval via get() or load()
* retrieval that happens implicitly when an association is navigated (lazy fetching)
* Criteria queries
Note that HQL is not in this list.
And of course, experience and experimentaiton fills in the gaps in the docs. I can't find anything in the refdocs that explicitly says that critieria (usually?) ignore the lazy attributes in your mapping file, but I know that they do.
FYI, default-lazy="true" is the default (up to 3.0.. I think it's default-lazy="no-proxy" in newer releases, not certain). So you don't strictly need to put that in your mapping files, though it doesn't hurt and does serve in a sort of self-documenting role.