Hello.
I would like to have a feature of dynamically loading entities when they are needed without rebuilding whole session factory (i.e. while keeping session open, add more entities (more classes, more hibernate xml mapping files). Do you know of similar functionality exists? I was looking to source code and was thinking to create pull request. Can you give some feedback whether dynamical loading is possible or what challenges I might encounter?
Problem I am trying to solve: I have a big set of classes that are pretty heavy and I want to avoid initiating all of them, until the are really required. Solutions that I see: 1) Class lazy loading i.e. tell hibernate that there is class and mapping, but do not load and do not manipulate with bytecode, until it's really required. 2) Dynamically loading entities when I will tell hibernate to load components when they will be needed. Essentially that's item 1, but I have a control over loading.
Thank you for feedback and opinions.
|