facebook

Hibernate config gets overwritten

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #225234 Reply

    icon911
    Member

    When I originally added Hibernate support to my project I did not create my hibernate.config.xml file properly. Now I removed that file and added a new hibernate.config.xml that works properly(again using wizard). However, every time I map a new table in hibernate myeclipse synchronizer I my hibernate.config.xml file gets overwritten with the old file. Any way I can get myeclipse to use the new file? Its the same name and both files were created with same wizard.

    Thanks

    #225251 Reply

    Riyad Kalla
    Member

    icon,
    Do you have the Hibernate Synchronizer plugin installs or are you using the built in Hibernate support in MyEclipse? The erason I ask is because you said “hibernate myeclipse synchronizer”, which made me wonder if the two plugins are fighting with eachother…

    #225461 Reply

    icon911
    Member

    I do not have the Hibernate Synchronizer plugin, sorry about the confusion. I only have MyEclipse plugin and hibernate config files gest overwritten every time I try to add new mapping.

    #225462 Reply

    Riyad Kalla
    Member

    hibernate config files gest overwritten every time I try to add new mapping.

    Ahh, this is the correct behiavor, it is regenned each time. We are making some big enhancements to it for the next few releases though, so this won’t be the case for long.

    #225463 Reply

    icon911
    Member

    So how do I stop it from overwriting my original settings before next release?
    Is there a property file I can just edit or should I keep a copy on the side and just paste it over, I am not complaining 🙂 this is a very small price to pay to have myEclipse!!!!

    #225473 Reply

    support-jeff
    Member

    You can modify the .myhibernatedata file in your project to fix the problem values. That way, when you regen the config file when adding mappings, the correct info is copied in.

    And Riyad is correct. This is currently the correct behavior (although not the most desireable). This will be fixed with upcoming enhancements (unfortunately, no dates yet).

    #226232 Reply

    Hi

    I had the same problem and after some research i realized that what i needed to do. One thing is that we badly need a “Modify Hibernate Configuration File” Feature in hibernate or the new “Hibernate Configuration File” Wizard should rewrite the configuration data in .myhibernatedata .

    I am right now using the quick fix as suggested by Jeff.

    Regards
    Ruchir

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Hibernate config gets overwritten

You must be logged in to post in the forum log in