Hello,

not sure this is a sensible place to post this, but I'll give it a do.

I've got a problem implementing something similar to the  composite
pattern in the entity framework using single class = single table
inheritance.
The composite can only have 1 child.

We've got a table

Component
ComponentID int (primary key, auto increment) (identity)

Composite
ComponentID int (PK and FK into ComponentID) (identity)
PartID int (FK into ComponentID)


Now put it through the import 'wizard' and it's too clever by half...i.e.
it doesn't do what I want it to...

It basically creates a single entity called Component, and then makes the
partID a self reference, there is no Composite Entity...

While this makes logical sense, Composites are just Components with a
reference and Non Composites are ones with none...it's not what I want.

Any ideas?

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to