• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: strange EO inheritance issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange EO inheritance issue


  • Subject: Re: strange EO inheritance issue
  • From: Ken Anderson <email@hidden>
  • Date: Fri, 04 Aug 2006 06:38:01 -0400

Patrick,

The performance problem would be related to fetching EO's at the super-entity level. I would expect it to perform additional selects on the extra table when doing those fetches.

To be honest, I was more thinking of all 8 tables using horizontal or vertical inheritance. After re-reading your message, it probably would not be as big of a problem as I had thought with 7 of the 8 using a single table.

Ken

On Aug 3, 2006, at 10:32 PM, Patrick Robinson wrote:

Ken,

I'm having a little trouble figuring out what the performance problems might be. Wouldn't it depend on the access patterns? In this app, each A object belongs to a different user, and they create shared C objects, which are associated with the A's via B. Just because one type of C corresponds to an association via a type of B which happens to be stored in a separate B table... I dunno, it doesn't seem like a problem to me. What am I not considering?

But.... that said, I think your suggestion of putting the extra columns in a separate table with a relationship to it from the 8th subclass is an excellent one. I should've thought of that!

Thanks,

- Patrick


On Aug 3, 2006, at 5:15 PM, Ken Anderson wrote:

Patrick,

Not to rain on your parade, but this is probably going to be a performance nightmare (even if you get it to work right).

I would suggest putting those extra columns in a separate table, putting a relationship to it in the 8th subclass, and setting a nice batch fault number on it. I bet you it will perform WAY better.

Ken

On Aug 3, 2006, at 5:05 PM, Patrick Robinson wrote:

I've got a rather strange EO inheritance question. I've got a situation where I've set up single-table inheritance (with a
subclass "type" column) for 7 out of 8 of my subclasses; and a separate table (with the same "type" column) that has a bunch more columns for the 8th, just because I didn't want all those columns sitting there empty for most of the rows (i.e. for the other 7 subclasses). Probably false economy, but be that as it may....


My structure looks like this:

A <-->> B <<--> C

C is modeled as an inheritance hierarchy using horizontal mapping, and B is modeled as the inheritance hierarchy described above, using mostly single-table mapping. There is a different subclass of B for each corresponding subclass of C.

It all built just fine, but when it came time to save an object of my new C subclass (the one that corresponds to the B subclass with its own table), the primary key of the C subclass object did not propagate to the B subclass object -- it was left as null. This is done with Oracle, so there's an Oracle sequence C_SEQ that's used to obtain C's primary key, and C_ID is the primary key of all C subclasses. Normally, this propagates to the B subclass objects just fine (with all the other B subclasses, that is), but it isn't working with the B subclass that is set in EOModeler to use its own table.

Has anyone else tried to do this kind of thing, or am I just trying to do something idiotic? :-)

--
Patrick Robinson
AHNR Info Technology, Virginia Tech
email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >strange EO inheritance issue (From: Patrick Robinson <email@hidden>)
 >Re: strange EO inheritance issue (From: Ken Anderson <email@hidden>)
 >Re: strange EO inheritance issue (From: Patrick Robinson <email@hidden>)

  • Prev by Date: Re: Oracle initcap: was MSSQL Server 2005 Unicode Support and EOF
  • Next by Date: Re: Mysterious EditingContext Swap
  • Previous by thread: Re: strange EO inheritance issue
  • Next by thread: Re: strange EO inheritance issue
  • Index(es):
    • Date
    • Thread