java - Mapping all the classes in hibernate.cfg.xml with just one line? -
i'm bit lazy , i'm trying find single liner map classes in hibernate.cfg.config
. (i'm using annotations not xml file)
what i've tried :
<mapping class="my_group.my_artifact.*"></mapping>
can acheived using 1 line of code? i've looked other answers on didn't find lazy way fits me, , i'm new i'll appreciate helpful comment.
you can't using hibernate only.
you can use spring org.springframework.orm.hibernate5.localsessionfactorybean
(package hibernate5
hibernate 5, change if need) or additional libraries described here:
Comments
Post a Comment