This is a migrated thread and some comments may be shown as answers.

Designer losing discriminator values for vertical inheritance with views

5 Answers 42 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nicole
Top achievements
Rank 1
Nicole asked on 23 Nov 2012, 08:43 PM

We are attempting to construct an .rlinq model against views (as opposed to tables).  Our model includes several classes that use vertical inheritance.  Unfortunately, it would seem that the designer is generating incorrect XML for the discriminators when views are used.  In particular, the orm:discriminator elements are being lost, leaving only discriminator-value attributes on the orm:class elements.

It would seem that the orm:discriminator elements are the important pieces that are consumed during runtime metadata parsing, which leaves code executed against our model unable to identify target subclass types during mapping.  e.g.:

Row for OID GenericOID@xxxxxxx Dog Id=616 NOTRES is not in the hierarchy starting at Foo.DataEntities.WeinerDog ('dbo'.'WeinerDog') (voa_class for row is 3)

 

We do not see either the design-time or runtime problem when the model is built against tables instead of views (with identical columns, including a voa_class column on the inheritance root table).

So...  Is vertical inheritance mapping using views a supported scenario?  If so, is there a workaround for this particular problem, or should we just submit a bug report?

Thanks,
Nicole

5 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 27 Nov 2012, 02:27 PM
Hello Nicole,

The discriminator value is not serialized in the model when the corresponding persistent type is mapped to view. We have improved this behavior. The fix will be part of the next service pack, which is scheduled for the beginning of the next week.

Kind regards,
Damyan Bogoev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
0
Nicole
Top achievements
Rank 1
answered on 04 Dec 2012, 02:05 PM
Thanks!  I'll give it a try once the update is available.

Nicole
0
Damyan Bogoev
Telerik team
answered on 07 Dec 2012, 10:51 AM
Hi Nicole,

We will contact you when the service pack is available to download.

Greetings,
Damyan Bogoev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
0
Damyan Bogoev
Telerik team
answered on 13 Dec 2012, 07:15 AM
Hi Nicole,

The service pack is available for download. You could find the release notes here.

If any other questions arise, do not hesitate to contact us back.

Kind regards,
Damyan Bogoev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
0
Nicole
Top achievements
Rank 1
answered on 13 Dec 2012, 09:06 PM
I've applied the update, and it seems to have fixed the problem just fine.

Thanks,
Nicole
Tags
Design Time (Visual Designer & Tools)
Asked by
Nicole
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Nicole
Top achievements
Rank 1
Share this question
or