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

Does the Domain Model designer support managed collections?

3 Answers 64 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hendrik
Top achievements
Rank 2
Hendrik asked on 26 Mar 2010, 01:32 PM
I was wondering if the Domain Model designer supports managed collections?

I have a simple 1:n relations between messages and recipients; a message can be send to multiple recipients. The model generated by the Domain Model designer creates a List<Recipient> Recipients property for the Message class, as expected. But when I add a recipient to the collections and then save the Message, I get an error:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Recipient_Messages".

So it seems Telerik OpenAccess ORM does not manage my 'Recipients' collection. Is this possible when using the Domain Model designer?

Hendrik




3 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 30 Mar 2010, 09:04 AM
Hi Hendrik,

 The collections created in the latest version of OpenAccess(from the Visual Designer) are actually managed by default. We have tested them on our side and the behavior seemed to be right. We would nevertheless like to figure out what could be the cause of the wrong behavior in your scenario so we would like to ask you if you could send us a sample project where you have it reproduced. If you would like to collaborate further with us, please start a support thread, as you are able to attach files there, so we can dig into the issue deeper and hopefully find the solution for you sooner.

Sincerely yours,
Zoran
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hendrik
Top achievements
Rank 2
answered on 30 Mar 2010, 10:18 AM
I'll try to send you an example asap.

The designer shows me the relation between Message and Recipient has both source-  and target-multiplicity set to 'ZeroMany'. And when checking the collection property on the Message object in the designer it says it uses a JOIN table. In other words: in SQL server this is a many to many relation. It looks like the JOIN table is not being filled, or being filled with invalid key values; hence the exception.


Hendrik

Update 14:49:
Send a bug report: 295380.
0
Zoran
Telerik team
answered on 31 Mar 2010, 01:01 PM
Hi Hendrik,

 Thanks a lot for the report. We evaluated the bug and it is scheduled for fixing already. You should see the fix as part of the next internal build release of our product which should be available in two weeks the latest. We have submitted this issue in the Public Issue Tracking System so you can check over the progress there. Your Telerik points were updated.

Sincerely yours,
Zoran
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Development (API, general questions)
Asked by
Hendrik
Top achievements
Rank 2
Answers by
Zoran
Telerik team
Hendrik
Top achievements
Rank 2
Share this question
or