Cannot add Order Detail to existing Order

4 posts, 0 answers
  1. Scott
    Scott avatar
    68 posts
    Member since:
    Nov 2011

    Posted 21 Nov 2011 Link to this post

    I am experiencing a problem loading an existing order, and adding a new order detail to it. It seems like a VERY EASY task to accomplish, however I cannot get OpenAccess ORM to do this.... I've attached some screen shots of the model and code i am using that reproduces the error i am having. Please someone tell me what I am doing wrong? Thanks in advance! :)
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 22 Nov 2011 Link to this post

    Hi Scott,

    Your code looks correct, but unfortunately we could not reproduce this error with a similar model. Could you please open a support ticket and attach your rlinq file there, so we can debug this behavior locally?
    Thank you in advance for the cooperation.

    Kind regards,
    Alexander
    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

  3. DevCraft banner
  4. Scott
    Scott avatar
    68 posts
    Member since:
    Nov 2011

    Posted 22 Nov 2011 Link to this post

    I submitted a support ticket.... granted i submitted a support ticket for something else last Friday and have not gotten a response yet.... I had to go back to manually doing the inserts myself to get around this issue... I was really hoping to be able to use OpenAccess ORM... we were looking at either EntityFramework or OpenAccess....

    We did not have these issues with EntityFramework... not sure why OpenAccess is choking on this simple thing.... I uploaded our RAR'd solution that we can reproduce the issue with.... I'm guessing since you were unable to reproduce, then there must be something corrupt or misconfigured on my machine?
  5. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 25 Nov 2011 Link to this post

    Hi Scott,

    Just to mention here for the others that could face the same problem, this turned out to be the expected behavior when the IsManaged property of the OrderDetails collection is disabled. Enabling this property should fix the problem, even the OrderId property of the new order detail does not need to be set explicitly.
    More information about the associations behavior can be found here.

    Regards,
    Alexander
    the Telerik team

    Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Back to Top