Add the ability to use hibernate.cfg.xml rather than snow.properties#39
Add the ability to use hibernate.cfg.xml rather than snow.properties#39imranzahid01 wants to merge 1 commit intoBriteSnow:masterfrom imranzahid01:master
Conversation
There was a problem hiding this comment.
In snow.properties file one can add the following line:
snow.hibernate.configuration=hibernate.cfg.xml
and the hibernate.cfg.xml can be anywhere in the classpath
|
Hi, this is interesting I think it is a good idea to add such support, but I would like to use this opportunity to decouple Hibernate from Snow internals. Originally I put Hibernate in Snow for convenience, but I think it is not very clean the way Hibernate is known from the internal. A while back, I added WebApplicationHook and WebRequestHook, which I was designed to be a clean way for the Hibernate "module" to hook itself into Snow. So, for this requirement, I am offering to update the way the hibernate snow module integrate to Snow so that it is easier to customize without changing Snow source. What do you think? |
Rather than using snow.properties I have modified the code to use hibernate.cfg.xml
This enables IDE (like IntelliJ IDEA) to understand the persistence use. Plus there is no need to define in multiple places the properties related to hibernate. Keeps both frameworks separate.