From: Christoph S. <ch...@mc...> - 2002-08-20 15:11:03
|
Hi Gavin! ----- Original Message ----- From: <Gavin_King/Cirrus%CI...@ci...> To: "Christoph Sturm" <ch...@sc...> Cc: <hib...@li...> Sent: Tuesday, August 20, 2002 3:48 PM Subject: Re: [Hibernate-devel] Volunteers? > > >What feature do you mean exactly with "normalized table mappings"? > >Subcasses that map to diiffenent tables? > > Yup. So you fetch the object using an outerjoin accross the table of the > superclass and the table of the subclass. This is the only remaining thing > thats bothering me about the core functionality. I think the really interesting part is that you can then create a polymorphic query that selects only elements from the base class, and the query generator knows that it doesnt need to join all the subclasses. > > >One thing that I would also propose for a todo is "alter table support" > >instead of drop / create table. I brought this up some time ago, but > >didnt implement it. I think i will take a look at this in the near future. > > This would be very cool. How do you propose to implement it? Diffing two > "create table" statements? Diffing two mapping documents? Diffing against > JDBC metadata? I was thinking about diffing against jdbc metadata. What I had in mind was an automatic check of the database metadata when hibernate starts up, and automatic execution of ddf statements that add missing columns and tables. The automatic part should not remove columns, because we dont want to loose data. Removing of columns should only be done by the db admin, hibernate could have a function to generate a report of not used columns in tables. > > The other thing missing from the commandline toolset is a table schema -> > mapping document generator. If we had that, we would have full > roundtripping. > > Eventually we still need to get round to making a GUI mapping file editor > that can call out to our commandline tools to do roundtripping. Its > actually not a very hard job. All thats needed is an editable tree > representing the mapping document - all the hard work is done by the > existing tools. > > We've got a really active userbase now so I *know* these tools will be used > by people :) > I will think a bit more, and grab some todos then :) peace chris |