View Issue Details

IDProjectCategoryView StatusLast Update
0003082SymmetricDSBugpublic2019-05-14 08:28
ReporterLanemAssigned To 
Status newResolutionopen 
Product Version3.8.21 
Target VersionFixed in Version 
Summary0003082: SQLite data type to handle GUID as UNIQUEIDENTIFIER
DescriptionWhen Replicating the SQLite DB from a SQL DB using SymmetricDS the Guid columns get inserted as Varchar. This does not create an Error when looking at the SQLite database or when reading information out of the database.

However because they are Varchars in the SQLite database Entity framework cannot save the Guid back, unless the Guid instead of being of type VARCHAR is set to type UNIQUEIDENTIFIER all this does in the SQLite database is set it to be a blob. but the name of it as UNIQUEIDENTIFIER makes it so that Entity Framework works with it in both directions
Steps To ReproduceCreate a SQL DB with some sort of GUID column
Replicate that DB to a SQLite database
Build your DB objects off of your SQL database (I am building with a T4 template that has the appropriate property type fixes for a SQL to SQLite transform EX. ntext to nvarchar, BigInt to Integer ect.)
Connect to that SQLite database with Entity Framework

and try to save any variable
Additional InformationThe way I have gotten around this for the time being is by setting up a backend property of type String to handle the save part of the objects. This means that the front end property is the normal Guid type but instead converts the String value back and forth. This causes a problem however with using those Guid front end values in LINQ statements.

The simplest fix would be to set the Guid variables on the SQLite side as a UNIQUEIDENTIFIER but there is no way to change the column data type in symmetricDS
Tagsdata conversion, data type, dialect: sqlite


related to 0003313 new Propagate default GUID from MSSQL to SQLITE 


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2017-04-28 15:58 Lanem New Issue
2019-04-24 11:03 elong Tag Attached: dialect: sqlite
2019-04-24 11:03 elong Tag Attached: data conversion
2019-04-24 11:03 elong Tag Attached: data type
2019-04-24 12:49 elong Relationship added related to 0003313
2019-05-14 08:28 elong Summary SQLite to Entity framework when using SQLite DB from symmetricDS => SQLite data type to handle GUID as UNIQUEIDENTIFIER