runtime? or does it weavs my classes?
Probably its if its how its shown
Just google "hibernate proxy", you should find a lot of information. What is proxy: "proxy design pattern" - is the search query. "gang of four" is a book about design patterns to read. What problem is solved with proxy in hibernate? To make associations be loaded lazily, only when they are accessed. For example, if you load Person entity from db and don't access his/her "parents" property then this association is not queried. How exactly that is implemented? That's better should be googled. But I guess it's dynamic proxies objects that are generated in runtime. Check "java dynamic proxy", just fyi, even if hibernate implements it in other way, this may be useful.
Обсуждают сегодня