-
1. Re: Multiple hibernate configuration files?
adamw Sep 27, 2011 2:17 PM (in response to drsaturno)Or you can just do it manually:
* first create the configuration
* then call AuditConfiguration.getFor(configuration);
* finally do the schema export
Did you find out why the .addConfiguredFileSet doesn't work?
Adam
-
2. Re: Multiple hibernate configuration files?
drsaturno Sep 27, 2011 4:24 PM (in response to adamw)We have to invoke configure() after involking addConfiguredFileSet(). But we can't do this, because we need to invoke getConfiguration() to get the configuration, and getConfiguration() do this:
if(cfg==null) {
cfg = createConfiguration();
doConfiguration(cfg);
cfg.buildMappings(); // needed otherwise not all assocations are made!
}
return cfg;
at this time, cfg is null, but we have no configuration files.
If we invoke configure() right after this, to use the configuration files, cfg is not null, so, doConfiguration is not called anymore.