Does the Domain Model designer support managed collections?

4 posts, 0 answers
  1. Hendrik
    Hendrik avatar
    23 posts
    Member since:
    Jan 2008

    Posted 26 Mar 2010 Link to this post

    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




  2. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 30 Mar 2010 Link to this post

    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.
  3. DevCraft banner
  4. Hendrik
    Hendrik avatar
    23 posts
    Member since:
    Jan 2008

    Posted 30 Mar 2010 Link to this post

    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.
  5. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 31 Mar 2010 Link to this post

    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.
Back to Top