How to automatically add hbm.xml in IDEA?

Go to Project Structure (Ctrl+Alt+Shift+S on my box) → Facets → Plus sign at the top of dialog → Hibernate → and select your cfg.xml file there. hbm.xml should connect to project automatically.

Here you can find info about generating persistence mappings. Briefly: in View -- Tools -- persustence tools window you can right-click your persistence unit ang there generate persistence mappings.


你可能感兴趣的:(How to automatically add hbm.xml in IDEA?)