java - Alternative locations for Hibernate mapping files? -
i read introductory tutorial on hibernate had mapping files inside same source directory of entities represented:
testproject/ src/main/java/ com.hibernate.tutorial.entities student.java student.hbm.xml course.java course.hbm.xml
etc. normally, place config files under src/main/config
, , ideally i'd have following project directory structure:
testproject/ src/main/java/ com.hibernate.tutorial.entities student.java course.java src/main/config hibernate/ student.hbm.xml course.hbm.xml
is there way this, , if so, how? in advance!
there 2 ways map pojo class hibernate entity:
- xml mapping
- using annotations
annotations becomes more prevalent last years. examples find here:
Comments
Post a Comment