JohnDoeKyrgyz wrote:
If I am not mistaken the lazy paramater of a collection mapping will produce the desired behavior when set to true. For example, when you use the following mapping the collection returned by the getLocalizedStrings method will load objects from the database only as needed.
No, the lazy setting on a collection only makes Hibernate be lazy about loading the entire collection. That is, it will only load the (entire) collection when you first try to do an operation on it, as opposed to when the entity containing the collection is loaded...