facebook

Trying to create database objects using Hibernate + XDoclet

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #232931 Reply

    rosenbsn
    Member

    I am trying to create database objects using Hibernate and XDoclet in the MyEclipse IDE. The version of Hibernate that I am using is 2.0 and 3.0 (tried both).

    When running XDoclet I am able to build the two XML files using the tags in my class. But, after going through the documentation I am not sure how to setup Ant to get Hibernate to generate the database objects. Any help would be appreciated.

    #232975 Reply

    Riyad Kalla
    Member

    When running XDoclet I am able to build the two XML files using the tags in my class.

    So you have marked up your POJOs with Hibernate XDoclet tags to generate the HBM files, is this correct?

    But, after going through the documentation I am not sure how to setup Ant to get Hibernate to generate the database objects.

    Now I’m confused, you should already have your database objects (POJOS) as you said you put your XDOclet tags in them to generate the HBM files… please explain in more detail what is going on.

    #232998 Reply

    rosenbsn
    Member

    Yes and I have create the HBM files. But when I run the application the database objects do not get created. The database connection information is correct and the empty database is in place with not tables, views, etc.

    I guess my question is do I need to me a call to the database for hibernate to create the objects or does it do it on its own when the web application starts up in tomcat?

    #233000 Reply

    Riyad Kalla
    Member

    Rosen please read through our hibernate tutorial here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html this should give a better introductory of Hibernate and how it works.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Trying to create database objects using Hibernate + XDoclet

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