RE: [OJB-developers] multiple classes mapped to single table requ est for comments
Brought to you by:
thma
From: Matthew B. <ma...@so...> - 2002-06-10 05:46:30
|
Damn oracle. That's about... average 50 characters per fully qualified class name, meaning a max of 5 classes in an IN statement. Well, the code is easy enough to change, if it becomes an issue. -----Original Message----- From: Jakob Braeuchi [mailto:jbr...@ho...] Sent: Sunday, June 09, 2002 10:40 PM To: Matthew Baird; 'Oleg Nitz'; obj...@li... Subject: Re: [OJB-developers] multiple classes mapped to single table request for comments hi matthew, > I thought about using IN, but doesn't that have a length limit? Maybe that's > not important for extents (people should inherit THAT much :)) afaik IN has (or at least had in previous versions) a length limit of 254 in Oracle. jakob ----- Original Message ----- From: "Matthew Baird" <ma...@so...> To: "'Oleg Nitz'" <on...@uk...>; <obj...@li...> Sent: Sunday, June 09, 2002 9:57 PM Subject: RE: [OJB-developers] multiple classes mapped to single table request for comments > Yah I figured #2 was the better was of doing it, I'm mostly done the > implementation now. > > I assume for joined tables we don't need to add the class discriminator > since that relationship shouldn't have been able to be created in the first > place if the class type was wrong. > > I thought about using IN, but doesn't that have a length limit? Maybe that's > not important for extents (people should inherit THAT much :)) > > m > > -----Original Message----- > From: Oleg Nitz [mailto:on...@uk...] > Sent: Sunday, June 09, 2002 12:43 PM > To: obj...@li... > Subject: Re: [OJB-developers] multiple classes mapped to single table > request for comments > > On Sunday 09 June 2002 19:27, Matthew Baird wrote: > > 2. Change the select queries for classes that have the 'ojbConcreteClass' > > column mapped to append a where discriminator based on classtype. So a > > query for all D in the above example would include the following WHERE > > clause > > > > WHERE MultiTable.CLASS_TYPE='D' OR MultiTable.CLASS_TYPE='B' > > > > PROS: Most efficient. No checking necessary to see if the > > materialized object is an instance of what was requested. Iterators Would > > only contain valid candidates and thus size and other methods would work > as > > expected. > > CONS: Bigger change, more change to SQL generation code; where > > clause would be slower? > +1 for #2 > > BTW you might use the shorter syntax > WHERE MultiTable.CLASS_TYPE IN ('B','D') > > Oleg > > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas - > http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |