1

I have some test tables mappings in my hibernate.cfg.xml file, for example:

<mapping resource="com/db/dummyentity.hbm.xml"/>

If this resource isn't exist in class path then my schema creation process will fail, there is any way to configure hibernate to ignore missing resources?

Shreyos Adikari
  • 12,348
  • 19
  • 73
  • 82
Maxim Kirilov
  • 2,639
  • 24
  • 49

1 Answers1

1

No it is not possible. If you provide a resource mapping in hibernate.cfg.xml file it have to be present in that particular location, otherwise it will fail.
Although config xml is not a mandatory file in hibernate.If you call Configuration#configure() method,to set your required properties(for example), then only hibernate will look for hibernate.cfg.xml file.

Shreyos Adikari
  • 12,348
  • 19
  • 73
  • 82