I accidentally posted this same question on the tools forum... sorry for the duplication...
I'm trying to use Hibernate (for first time) on a new project. Our application will be implemented as distributed Java SE 5.0 components with an Oracle 9i database. We may move the data management components into a container at some point in the future (but for now I plan to use thread local context management). The database and the application components are being developed at the same time.
It has been suggested to me that I develop the schema first and then generate the persistent entity beans (using hibernate tools). It is believed that the resulting database will be used by other systems so it needs to be well formed (this is why I'm not currently following a Top down scenario).
It appears that the hibernate-reverse-engineering cutomization file does not support many of the O/R metadata options. I need to: (1) map class inheritance (using multiple inheritance strategies), (2) specify eager loading on certain associations, (3) use formula tags, and (4) do other fancy stuff.
My question(s):
(1) Am I completely off base using a "Bottom-up" development process? I've considered using "Middle-out" but that is supposed to only be attempted by seasoned Hibernate experts.
(2) How can I best leverage an existing database schema (that will change as development progresses) to generate mapping information while still having the ability to use finer grained mapping options? Is there a way to combine multiple mapping files for the table/class (one generated and one done by hand)?
(3) Should I just forget about reverse engineering from the JDBC connection?
(4) How would you proceed if you were me (a newbie)?
Any suggestions are appreciated!
|