Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Ecore switch to not generate base class tables?
[CDO] Ecore switch to not generate base class tables? [message #932277] Thu, 04 October 2012 01:23 Go to next message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member

I made a model change today to bring common fields up into a base model object shared between two other model objects. What I found is that the database schema was generated such that all the common fields are still defined in the table for the child classes but that the schema being generated still contains tables for the base class and its associated referencs, lists, etc. The tables remain empty after adding model objects to the server. Is there a way to toggle off the creation of tables for the base model object if the child classes contain all of its fields?

Thanks,
Warwick
Re: [CDO] Ecore switch to not generate base class tables? [message #932928 is a reply to message #932277] Thu, 04 October 2012 15:20 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 04.10.2012 03:23, schrieb Warwick Burrows:
>
> I made a model change today to bring common fields up into a base model object shared between two other model objects.
> What I found is that the database schema was generated such that all the common fields are still defined in the table
> for the child classes
Yes, we call that horizontal mapping. It's known to be faster than vertical mapping in most situations.

> but that the schema being generated still contains tables for the base class and its associated referencs, lists, etc.
I've never seen this effect. Are you sure they're not left-overs from former experiences?

> The tables remain empty after adding model objects to the server. Is there a way to toggle off the creation of tables
> for the base model object if the child classes contain all of its fields?
No, because that's not the expected behaviour anyway. Can you set a breakpoint in DBAdapter.createTable(IDBTable,
Statement) and paste the stack traces here?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Ecore switch to not generate base class tables? [message #933122 is a reply to message #932928] Thu, 04 October 2012 18:59 Go to previous message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member
Eike Stepper wrote on Thu, 04 October 2012 11:20
Am 04.10.2012 03:23, schrieb Warwick Burrows:
>
> I made a model change today to bring common fields up into a base model object shared between two other model objects.
> What I found is that the database schema was generated such that all the common fields are still defined in the table
> for the child classes
Yes, we call that horizontal mapping. It's known to be faster than vertical mapping in most situations.

I thought so, just wanted to confirm.

Quote:

> but that the schema being generated still contains tables for the base class and its associated referencs, lists, etc.
I've never seen this effect. Are you sure they're not left-overs from former experiences?

Yes, before each time I tried it I dropped all tables in the schema.

Quote:

> The tables remain empty after adding model objects to the server. Is there a way to toggle off the creation of tables
> for the base model object if the child classes contain all of its fields?
No, because that's not the expected behaviour anyway. Can you set a breakpoint in DBAdapter.createTable(IDBTable,
Statement) and paste the stack traces here?

I'll get this for you but I cant drop tables on the server as its being used by others so will need to prep another to test.

Warwick

Previous Topic:EContentAdapter does not notify EAttributes List Elements changes previously added
Next Topic:[CDO] Generated Editor with CDOResource
Goto Forum:
  


Current Time: Fri Apr 26 00:00:22 GMT 2024

Powered by FUDForum. Page generated in 0.02686 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top