I'm pre-warning you that this will be a bit involved, Jon - and you will probably have to change the Loadable interface, refactoring some stuff thats currently done in the Loader hierarchy onto the XXXXEntityPersister classes.
I don't have an existing testcase, but if you add a many-to-one association to some class in Multi.hbm.xml, that will be enough. MultiTableEntityPersister implements table-per-subclass persistence. EntityPersister implements the old-style persistence. Currently MultiTableEntityPersister is a valid implementation of operations from ClassPersister and Queryable but *not* of all operations defined on Loadable. ie. MultiTableEntityPersister defines the operations needed by SimpleEntityLoader but not by OuterJoinLoader. At the moment, I am generating SQL along the lines of: select t.id as id1, t.clazz as clazz1, t.prop as prop1, t1.subprop as subprop1 from roottable t left outer join subtable t1 on t.id = t1.id for the _query_ stuff. That will have to change in a couple of ways: (1) it doesn't handle the case of two columns with the same name in different tables (2) it shouldnt always be an outerjoin really .... sometimes it should be just a join but thats enough to get us started. Baby steps. So if you generate something similar for outerjoin loading, we will be in business. P.S. I just noticed that because MultiTableEntityPersister doesn't support outerjoin loading, it also can't be loaded by CollectionLoader or EntityLoader. So this is an important thing to finish. ----- Original Message ----- From: "Jon Lipsky" <[EMAIL PROTECTED]> To: "Gavin King" <[EMAIL PROTECTED]> Sent: Friday, October 11, 2002 4:34 PM Subject: Re: [Hibernate] Looking for Volunteers > Hi Gavin, > > Not a problem. If you can point me to a valid test case for this, I'd be > more than willing to make sure the outer join fetching works. > > Jon... > > > ----- Original Message ----- > From: "Gavin King" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, October 09, 2002 6:56 PM > Subject: [Hibernate] Looking for Volunteers > > > > Okay, I finally have something concrete for normalized > (table-per-subclass) > > mappings. I went down a couple of wrong paths before I decided on the best > > approach (a completely new implementation of ClassPersister). > > > > I can save/load/update/delete instances already. > > > > We need (in order of importance): > > > > * SchemaExport support (and proper support in the mapping document) > > * Query language integration (the hard bit) > > * Support for outerjoin fetching > > * Support for versioning (easy) > > * support for native id-generation (not very hard) > > > > If anyone wants to help out with any of these problems, I would very much > > appreciate it. > > > > ( In particular, since Jon Lipsky understands the outerjoin fetching code, > > maybe he would have a look at that stuff? ) > > > > I'm perhaps being slightly over-eager here, since I still need to rework > the > > map package part of this; what I've got there now is kludge. But I will do > > that (and finish it) tomorrow. When I do that, it will knock the top item > > off the list by side-effect and make the other items doable. > > > > Anyway, if anyone can spare the time, please stick your hand up and I will > > point in right direction.... > > > > Gavin > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel