Hi,
Thanks for your immediate response. The example that I gave you in the last post is just for the sake of discussion. In reality, we have many many hbm files with different hierarchy. I'm just concerned it might be a problem to specify all hbm files at once with different hierarchy and build the session factory.
Eg:
In one package, we have 5 hbm files. Class A contains collection of Class B which contains collection of Class C and so forth. In another package we have similar hierarchy. As per you suggestion, I guess doing this way is not a problem, am I right?
sf = new Configuration().addClass(pkg1.A.class)
.addClass(pkg1.A.class)
.addClass(pkg1.A.class)
.addClass(pkg2.B.class)
.addClass(pkg2.B.class)
.addClass(pkg2.B.class)
.addClass(pkg2.B.class)
.buildSessionFactory();
Best Regards.
|