I meet a problem about: Object of type 'System.Int64' cannot be converted to type 'System.Int32' when run the SubSonic.Examples.SimpleRepo project base on SQLite provider.
I fond that the data type for table Categories's column CategoryID is 'integer', and the 'integer' in SQLite will be return as Int64, in the same time the CategoryID's data type in the Class Category is int, the above error is happened.
I checked the SubSonic's source code: \SubSonic.Core\SQLGeneration\Schema\SQLiteSchema.cs and find the following codes:
else if (column.IsPrimaryKey && column.DataType == DbType.Int32
|| column.IsPrimaryKey && column.DataType == DbType.Int16
|| column.IsPrimaryKey && column.DataType == DbType.Int64
)
sb.Append(" integer ");
Who can tell me the purpose for these codes? How to solve the data type convert error?