fluent api and ordered lists

2 posts, 0 answers
  1. Kenneth
    Kenneth avatar
    70 posts
    Member since:
    Feb 2008

    Posted 12 Nov 2011 Link to this post

    in classic mode - when I create a list, it is automatically maintained in order. In the join table, there is a "seq" column that maintains the order.

    I've upgraded to the domain model (but have not made changes to the DB), but now when ever I attempt to make a change to any list, I get the error that 'seq' cannot be null. 

    I am guessing that the problem is that the fluent api does not support ordered lists, or does not support them in the same way.

    I see that you can add an order by clause to an association, but that don't see how I could replicate the original behavior using this.

  2. Serge
    Serge avatar
    375 posts

    Posted 14 Nov 2011 Link to this post

    Hi Kenneth,

     I will paste here the answer provided in the similar support thread.

     We actually provide support for ordered associations. You just have to specify the sequence column name using the .HasSequenceColumn(string) after MapJointTable(). What we have changed is the default behaviour of Lists, as they should usually be mapped without an extra table. 

    Please try this out and let us know whether this works for you. If you face further trouble it would be best if you could provide us with a sample solution that we can use for debugging purposes. 

    I am looking forward to resolving this matter with you.

    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

Back to Top