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-09 19:56:34
|
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 |