facebook

Hibernate Wizard Question

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #217031 Reply

    vbfischer
    Member

    It doesn’t appear possible to specify the name of the generated class in the Hibernate Wizard. I’d like to be able to change the default name of the generated Hibernate class.

    Unfortunately, I’ve inherited a database that has some very ugly table names (PAYPKGPAYS for instance). I know I can go through and manually change them using refactoring, but it still requires at least 3 refactorings per table I want to change.

    Thanks.

    #217052 Reply

    Riyad Kalla
    Member

    Let me check with dev if this is on his radar…

    #217065 Reply

    support-jeff
    Member

    There are plans afoot for just such support. Probably with the 3.9 release or beyond. I cannot comment on timeframe cuz I just don’t know at this point in the game.

    #219379 Reply

    Is there a way to manually work around this problem in the meantime, as I have a similiar problem.

    #219396 Reply

    support-jeff
    Member

    Unfortunately not. The only options you have at this time are:
    (1) Change the table names in the database
    (2) Create views with desired names wrapping each table
    (3) Manually modify the mapping and class files generated – will be a problem with regeneration

    #219419 Reply

    Of course, I do not like that answer. Why did you switch from using the Hiberante tool that would autmatically gen the new code als the .xml files changed that can be invoked from ANT?

    #219451 Reply

    support-jeff
    Member

    ???? No such beast ever existed. The Hibernate tooling that existed previously came directly out of the SQLExplorer plugin that was adopted by MyEclipse. That code sucked, it sucked hard. While the current tooling is not much more sophisticated than that code was, it is ready and waiting to be refactored into a much more significant tool base.

    Maybe you are confusing the ME Hibernate tool with the code gen tools that exist inside Hibernate itself? that or some other plugin for eclipse?

    #219486 Reply

    You are correct, that no such beast directly existed. Currently, I use a combination of the Hibernate Middlegen tool to dynamically generate the mapping files along with the hbm2java to generate the code. Why not use the hbm2java to generate the code once the mapping files have been created?

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Hibernate Wizard Question

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