doConnect for SQLite is unable to create the unique index names
Posted: Fri 17 Jan 2014 09:53
Hi,
I have created a sample application in which there are two one-to-many relationships between two POCO classes and the design is as follows:
So, here you can see that class “School” contains two navigation collection properties of type “Student”. When I created the database from code, then ideally it should create two indices “IX_FK_School_Alumini” and “IX_FK_Students” but it does create only one index “IX_FK_School_Student”. So, the next time when the provider tries to add another index for second property the provider raises an exception that index already available.
Please let me know if there is any solution for this issue or is there any workaround to this issue?
Thanks,
Pankaj Sachdeva
I have created a sample application in which there are two one-to-many relationships between two POCO classes and the design is as follows:
Code: Select all
public class Institution
{
[Key]
public int RowId { get; set; }
}
public class School : Institution
{
public string Name { get; set; }
public List <Student> Students { get; private set; }
public List <Student> Alumni { get; private set; }
}
public class Student
{
public List <Course> Courses { get; set; }
[Key]
public int RowId { get; set; }
}
Please let me know if there is any solution for this issue or is there any workaround to this issue?
Thanks,
Pankaj Sachdeva