Invalid association when trying to create an M2M-relationship involving composite keys involving a DateTime

Jan 8, 2014 at 1:50 PM
Edited Jan 8, 2014 at 2:33 PM
First of all, thank you for creating and maintaining this project - this seems to be really useful! Why "seems"? Because I couldn't get it to work for my scenario for now:

I have two object, CourseDate and Student, where a course date can have many students and vice versa. The primary key of the CourseDate consists of a string and a DateTime property. The primary key of the Student is a simple long property. The linker table in the database therefore consists of those three columns.

When I build my according to the step-by-step guide my server side project compiles well, but the client side project fails providing the following error:
Association named 'CourseDate_CourseDateStudents' defined on entity type 'CourseManager2.Web.Data.CourseDate' is invalid: OtherKey property named 'Object1_DateTime_Id1' cannot be found on entity type 'CourseManager2.Web.Data.CourseDateStudent'. CourseManager2
When looking at the M2M sources - especially those of the LinkTable<> class these do not seem to support dates as part of the key. Is that correct? And if so - is there anything I can do about that?
Jan 8, 2014 at 2:52 PM
Hi,
Thanks for reporting this.
I'll add support for datetime keys in the coming days.
Merijn
Jan 8, 2014 at 2:52 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.