I am new to Hibernate. I have been reading hibernate document online, but could not figure out exactly about few things :
- About export utility for database schema. It requires mapping xml files. What does this utility do. I mean if it creates classes - for database tables? and about mapping xml file- if there any utility to generate those xml files by going thru the database schema, instead of writing those files manually. - and for update utility re. database schema again we have to modify the xml file first and then run this utility to re-create new class files for database schema. Am I right?
This all depends on which utility you are talking about. Hibernate does have command line tools to generate POJO class files from XML mapping files and viceversa. It also has tools to change a DB schema dependant on changes made to the mapping files. There are also third party tools unconnected with Hibernate whic hcan do this (such a middlegen).
Hibernate does have command line tools to generate POJO class files from XML mapping files and viceversa.
Does hibernate has tools for generating mapping xml files without POJO class files. as you said it can be done vice versa means either of the two must be present.
I have to work on a project where I don't know anything about what database may be used, or what can be its database schema. I need to get database schema,generate entity beans or I can also just rely on hibernate for persistence layer.
My application will be later on used by another developer to customize it according to a particular business module. We are planning to use jboss as application server and ejbs for the final customized application.
I want to develop something like Middlegen but without the another developer specifying table and their relationship as I saw it on middlegen web site frontpage. My application will generate the persistence classes and then cmp beans.
Middlegen is the closest to what you need. Check here for a brief overview of the tools. I assume your project is not a commercial project - otherwise you wouldn't be able to incorporate any of these other tools into it. In which case you might consider contacting one of the groups developing these tools, as the extra functinality you propose might be useful as part of their product.
Joined: Oct 18, 2004
Thanks for your replies!! I read the link- so they are already considering about direct xml generation.
subject: re. export and update utility of Hibernate and mapping xml files