2) The 3.0 DTD at sourceforge doesn't mention the lazy attribute on many-to-one at all. Strange. In the downloaded source code, the 3.0 DTD in the 3.1.1 release doesn't allow lazy="true", but does allow lazy="no-proxy", which is the new name for the same thing. In the 3.0.5 release, the 3.0 DTD allows lazy="true". Eclipse's red line is probably dependent on which version of the DTD it's looking at.
1 + 2(b)) lazy="proxy" means that when any member of the proxied object is queried, the whole object is retrieved in one select statement. Until then, a fake (CGLib) version of the object is used. Any values that hibernate puts into the fake version (notably, the ID) are valid values, and when they're accessed, hibernate does not de-proxy the object. lazy="true" or lazy="no-proxy" issues the select as soon as the object is accessed.
This is from the ref docs, section 19.1:
Quote:
"No-proxy" fetching - a single-valued association is fetched when the instance variable is accessed. Compared to proxy fetching, this approach is less lazy (the association is fetched even when only the identifier is accessed) but more transparent, since no proxy is visible to the application. This approach requires buildtime bytecode instrumentation and is rarely necessary.