facebook

Code Generation

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #250003 Reply

    macinsmith
    Member

    One of the really great features of Hibernate is the ability to centralize most of your database issues in a mapping file including named queries. A good example of this is given in the Oreilly book Hibernate – A developer’s Notebook by Elliott. This book shows how you can use an ant to create a database schema and the java source to allow you to persist data. You only need to write the mapping file and Hibernate does the rest. It is extremely powerful! The amount of actual database related code that you need to write is minimal. This is documented in the Hibernate Tools reference guide (3.1.0.beta4). When do you plan to expose this technology in MyEclipse?

    #250005 Reply

    macinsmith
    Member

    Well, it seems I spoke too soon. It appears that this feature is already there for POJOs. I just discovered another post describing that all I needed to do was to right click on the mapping file and select Generate POJO. It worked. So that’s part one. How about the ability to generate the schema for the entire database?

    #250064 Reply

    Haris Peco
    Member

    How about the ability to generate the schema for the entire database?

    do you think generate schema from mapping files or reverse engineering from database ?

    We will make database editing (creating tables, indexes, foreign key …) in future releases and probably reverse eng. schema from databases

    If you think about generating shema from mapping files we can add this, but hibernate schema export tools is not too good – you have to defined column in mapping files (this is manula editing xml files) and then hibernate schema export tool is bad.It can be better in future hibernate releases, but for now it is bad
    it is easier make tables with our wizards (future) and then generate mappings files and POJOs

    Best

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Code Generation

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