Designer losing discriminator values for vertical inheritance with views

6 posts, 0 answers
  1. Nicole
    Nicole avatar
    3 posts
    Member since:
    Jun 2012

    Posted 23 Nov 2012 Link to this post

    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

  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 27 Nov 2012 Link to this post

    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.
  3. DevCraft banner
  4. Nicole
    Nicole avatar
    3 posts
    Member since:
    Jun 2012

    Posted 04 Dec 2012 Link to this post

    Thanks!  I'll give it a try once the update is available.

    Nicole
  5. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 07 Dec 2012 Link to this post

    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.
  6. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 13 Dec 2012 Link to this post

    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.
  7. Nicole
    Nicole avatar
    3 posts
    Member since:
    Jun 2012

    Posted 13 Dec 2012 Link to this post

    I've applied the update, and it seems to have fixed the problem just fine.

    Thanks,
    Nicole
Back to Top
DevCraft banner