facebook

Creating Hibernate Classes with diff Name

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

    icon911
    Member

    When I use the hibernate mapping tool within database explorer the class that gets created has database tables name, I would like to change the class but do not want mess up myEclipse ability to automatically edit the xml mapping file and so on. What would be the best way to do it? Or I can just go ahead and rename the class and the mapping file and myEclipse will keep track of those changes.

    Thank you

    #225227 Reply

    Riyad Kalla
    Member

    The tool will not be aware of the change, so next time you change the DB and regenerate the classes, all the old classes that you renamed will be recreated again. If this DB structure is not going to change, then you can likely generate the classes once, and then rename them (don’t forget to update the hibernate.cfg.xml file) but for the ease of use it is suggested to leave them the way they are (As far as renaming goes).

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Creating Hibernate Classes with diff Name

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