开发者

Entities as views of a table

Is it possible to creat开发者_开发知识库e 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜