Page 1 of 1

doConnect for SQLite is unable to create the unique index names

Posted: Fri 17 Jan 2014 09:53
by pankajsachdeva85
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:

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; }
}
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

Re: doConnect for SQLite is unable to create the unique index names

Posted: Fri 17 Jan 2014 13:42
by Shalex
We have reproduced the issue and are investigating it. We will notify you about the result as soon as possible.

Re: doConnect for SQLite is unable to create the unique index names

Posted: Mon 27 Jan 2014 10:13
by Shalex
The bug with creating indices for foreign key columns, when two tables are referenced by two or more FKs, in Code-First functionality is fixed. We will notify you when the corresponding build of dotConnect for SQLite is available for download.

Re: doConnect for SQLite is unable to create the unique index names

Posted: Thu 30 Jan 2014 15:56
by Shalex
New build of dotConnect for SQLite 5.1.90 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/sqlite/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=29&t=28827.

Re: doConnect for SQLite is unable to create the unique index names

Posted: Fri 31 Jan 2014 10:09
by pankajsachdeva85
Thanks Shalex for the update, I have tried the latest provider and the issue is fixed.