Inheritance sub class primary key

11 posts, 0 answers
  1. Noam Berda
    Noam Berda avatar
    10 posts
    Member since:
    Mar 2007

    Posted 18 Oct 2013 Link to this post

    Hi,
    We have been using Telerik ORM for long time now. We have currently version 2012.2.801.1

    When we tried to upgrade to the latest ORM version 2013.1.xx the vertical inheritance stooped working. We are using the rlinq meta data modeling.

    The problem we are facing is on the sub class primary key. We are using vertical inheritance and since we have upgrade to the latest version we are getting a mapping working that the primary key on the sub class is not mapped.

    How could we solve this and let the mapper understand that the subclass Id should use the base class id.

    Thanks,
    Noam
  2. Ralph Waldenmaier
    Admin
    Ralph Waldenmaier avatar
    202 posts

    Posted 18 Oct 2013 Link to this post

    Hi Noam,

    First let me apologize for the inconvenience this causes to you.
    We are aware of this issue with the latest version of the product and will fix it asap.
    The problem lies in the calculation of the columns to be used for a key generator. Unfortunately, there is no workaround at the moment that I can suggest to you. 

    Again, please accept my apologies for this.
    Feel free to ask in case you have any other question.

    Regards,
    Ralph Waldenmaier
    Telerik
    OpenAccess ORM Q3 2013 Beta is available for immediate download in your account. Get it now and play with the latest bits. See what's new >>
  3. DevCraft banner
  4. Tolulope
    Tolulope avatar
    3 posts
    Member since:
    Mar 2013

    Posted 28 Oct 2013 Link to this post

    Hi Ralph,

    Please how do we roll back to the 2012.xx version? We need to roll back urgently because of this issue.
  5. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 28 Oct 2013 Link to this post

    Hello Noam and Tolulope,

    We are currently preparing an internal build which will function as a hot fix for this issue, and we expect it to be live within 1-2 days. Nevertheless, if you need to downgrade immediately, you can do so by canceling the upgrade changes and installing the old OpenAccess ORM version on the development machines.

    We will explicitly notify you by posting in this thread when the internal build is available.

    Regards,
    Ivailo
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  6. Tolulope
    Tolulope avatar
    3 posts
    Member since:
    Mar 2013

    Posted 28 Oct 2013 Link to this post

    Thanks Ivailo,

    I've uninstalled from the control panel but I can't seem to find how to install the older version from the control panel. Could you please show me how to do this?

    We could reinstall this new version as soon as the fix is ready but we need to revert to the previous version today.

    Regards.
  7. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 28 Oct 2013 Link to this post

    Hello Tolulope,

    You can download an older version of OpenAccess ORM that you have installed at least once in the past by going to the Products & Subscriptions -> Free Products section of the web site, selecting OpenAccess ORM and going to the All Product Versions page (the link is available on the bottom of the right menu). There you will see the versions and you will be able to download an offline MSI installer.

    I hope that helps.

    Regards,
    Ivailo
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  8. Tolulope
    Tolulope avatar
    3 posts
    Member since:
    Mar 2013

    Posted 29 Oct 2013 Link to this post

    Thanks. I've been able to revert to the previous version. Kindly let us know as soon as the fix is deployed.
  9. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 11 Nov 2013 Link to this post

    Hi,

    The fix is provided in the internal build 2013.3.1101.1.

    Kindly let me know if you continue experiencing any issues after upgrading to this build.

    Regards,
    Ivailo
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  10. Robin
    Robin avatar
    8 posts
    Member since:
    Oct 2013

    Posted 13 Nov 2013 Link to this post

    This has it working for me now! Was about to give up on this.

    I ran into another thing tough. I notice that when I generate a service/scaffold, it doesnt generate Controllers for the child classes/tables anymore (options are greyed out). While this seems to works fine, with just passing a child object to the base Controller, the thing is that I had planned my entire database on one base table/class (multi tenant, versioning, etc.). So this means 1 controller for the entire project.
    How to do cope with intermediate processing? Or am I overlooking something with the scaffolding?

  11. Dimitar Tachev
    Admin
    Dimitar Tachev avatar
    67 posts

    Posted 18 Nov 2013 Link to this post

    Hi Robin,

     
    Based on the details that you provided us I assume that you are trying to generate ASP.NET Web API service using our Add OpenAccess Service wizard and if my assumption is correct you should be able to generate the service for the child classes of your model.

    I have tested this scenario with a sample model containing all of our supported inheritance types - Flat (the Default one), Vertical and Horizontal and I got controller for each of the domain classes except the base horizontal one because it is an abstract class.


    In order to find out the reason for getting a domain class disabled in the entities selection I suggest you hover the class name showing the validation message. For example if you forget to map a class to a table you will get it disabled with the following message:


    If my assumptions are not correct or you are still experiencing the same issues after considering the validation messages, could you please provide us with mode details about:

    1) Do you use our Add OpenAccess Service for generating the service?
    2) Which is the service type that you have selected? 
    3) What is the validation message of the disabled children?
    4) Specific details/configurations if any.

    I am looking forward to your feedback.

    Regards,
    Dimitar Tachev
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  12. Robin
    Robin avatar
    8 posts
    Member since:
    Oct 2013

    Posted 19 Nov 2013 Link to this post

    Thanks for you reply Dimitar,

    You are right in your assumptions: used the service wizard, webapi, etc. Your tip regarding the validation message got me further. The message said that the properties where not mapped to columns for the child classes. I checked and they were mapped, but by use of the default mapping checkbox. When I unchecked this and manually mapped, I was able to generate services for the child classes! (this required a recompile before I was able to do this though).
Back to Top
DevCraft banner