- This topic has 1 reply, 2 voices, and was last updated 16 years, 6 months ago by Brian Fernandes.
-
AuthorPosts
-
Michael J CaugheyParticipantWhen I orginally set up my project I set it up with Spring 2.0 and Hibernate 3.1 and I had everything working fine. then I changed the database I was pointing to. I manually changed the applicationResources.xml. I had to reverse the beans again so that the catalog would be updated in the HBM files. I no longer have the option for SpringDAO.
So I have a couple of questions here:
1) The obvious one, how do I get things configured so that the Hibernate rev eng allows Spring DAO’s again?2) Is there a template file somewhere for the HBM file where i can remove the catalog option. I deploy to more than one environment each with their own DB schema (Catalog). I don;t want to have a different applicationResource.xml or war file for each environment.
3) What actually causedthe loss of informaton, i presuume in the cappabilities metadata?
Brian FernandesModeratormcaughey,
Could you tell us which version of MyEclipse you are using?
a) Did you rename your project? If so, you need to re-associate the hibernate or spring config file with your project on the MyEclipse > Hibernate project properties page.
b) The SpringDAO option checks for the following:
1) You have a Hibernate-Spring project
2) You have at least one Spring configuration file registered with your project (check that your Spring config is still registered on the MyEclipse > Spring project properties page.
3) You have at least one LocalSessionFactoryBean bean defined in any of the Spring configuration files registered with your project.Unless any of the above changed, I cannot think of why the SpringDAO option would disable itself. Can you see the spring configuration file and the LocalSessionFactoryBean in the Spring Beans view? Do you have build automatically turned on?
Regarding the catalog removal, please see section 5.5 of the Hibernate tutorial (non-flash) for instructions on using templates. Once you get it setup, you need to modify the hbm/persistentclass.hbm.vm file and modify/delete lines 15-17.
Hope this helps.
-
AuthorPosts