| Author |
Hibernate annotation configuration for multiple annotated classes
|
Anand Jain
Greenhorn
Joined: Jul 27, 2009
Posts: 17
|
|
I am using hibernate annotations and for that in the hibernate.cfg.xml i need to add annotated classes like this here p is the package name and Customer is the annotated bean.
Suppose i have 20 such kind of annotated classes, it means I have to write 20 mapping lines for that class.In Spring there is a property packageToScan that can be used to register/load all hibernate annotated classes in the specified package.
Since I am not using Spring, do we have the same functionality in Hibernate?
Also I found one tag in hibernate.cfg.xml at first I thought this will do the job for me, but it didn't work. I didn't get what is the use of this property. Can somebody please let me know about it?
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
|
Nope to my knowledge this functionality does not exist without Spring.
|
[How To Ask Questions][Read before you PM me]
|
 |
 |
|
|
subject: Hibernate annotation configuration for multiple annotated classes
|
|
|