views:

10

answers:

1

Is it possible to create multiple entities as 'views' of one master table? Let me explain.

Lets say we have a very large table called Foo in a database which schema we're not allowed to alter.

Foo ( Key1, field1, field2, field3, field4, field_n )

We want to create 3 updateble entity types from Foo.

FooLite ( Key1, field1 )
FooAlt ( Key1, field2, field3 )
FooAlt2 ( Key1, field4 )

Inheritance wouldn't work even if we were to rebuild a hierarchy from scratch as some entity variations should exclude some fields. By trying to build a model following this scenario above we keep on getting the error below. If feels like you're not allowed to map an entity field more than once to a storage field, is this true?

Error 3007: Problem in mapping fragments starting at lines 703, 860:Column(s) [CREATE_DATE] are being mapped in both fragments to different conceptual side properties.

A: 

You can do this, but I don't think you can do it through the designer. The DefiningQuery element in SSDL does what you want.

Craig Stuntz