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

fluent api and ordered lists

1 Answer 98 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kenneth
Top achievements
Rank 1
Kenneth asked on 12 Nov 2011, 07:42 PM
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.

-Ken

1 Answer, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 14 Nov 2011, 02:40 PM
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.

Greetings,
Serge
the Telerik team

NEW and UPDATED OpenAccess ORM Resources. Check them out!

Tags
General Discussions
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Serge
Telerik team
Share this question
or