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

Cannot add Order Detail to existing Order

3 Answers 31 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Scott
Top achievements
Rank 2
Scott asked on 21 Nov 2011, 09:39 PM
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! :)

3 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 22 Nov 2011, 11:20 AM
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!

0
Scott
Top achievements
Rank 2
answered on 22 Nov 2011, 02:21 PM
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?
0
Alexander
Telerik team
answered on 25 Nov 2011, 09:22 AM
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!

Tags
Getting Started
Asked by
Scott
Top achievements
Rank 2
Answers by
Alexander
Telerik team
Scott
Top achievements
Rank 2
Share this question
or