View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003082 | SymmetricDS | Bug | public | 2017-04-28 19:58 | 2019-05-14 12:28 |
Reporter | Lanem | Assigned To | |||
Priority | high | ||||
Status | new | Resolution | open | ||
Product Version | 3.8.21 | ||||
Summary | 0003082: SQLite data type to handle GUID as UNIQUEIDENTIFIER | ||||
Description | When 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 Reproduce | Create 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 Information | The 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 | ||||
Tags | data conversion, data type, dialect: sqlite | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2017-04-28 19:58 | Lanem | New Issue | |
2019-04-24 15:03 | elong | Tag Attached: dialect: sqlite | |
2019-04-24 15:03 | elong | Tag Attached: data conversion | |
2019-04-24 15:03 | elong | Tag Attached: data type | |
2019-04-24 16:49 | elong | Relationship added | related to 0003313 |
2019-05-14 12:28 | elong | Summary | SQLite to Entity framework when using SQLite DB from symmetricDS => SQLite data type to handle GUID as UNIQUEIDENTIFIER |