anonymous wrote :
| int modelId = u.getModel().getId(); // causes read of Model table!
|
| Issue - this will cause a read of the model row from the DB (won't it, as in lazy
loading will perform a JIT read)
|
No it won't. You obviously haven't tried it, or you wouldn't be asking about
it. The ID field of the association is special in the way that reading it will NOT trigger
lazy loading. Any other operation on the lazy object, however, will.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110463#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...