Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlite: scaffolding: a nullable bool is created as string in the POCO entity #8725

Closed
ComptonAlvaro opened this issue Jun 4, 2017 · 1 comment

Comments

@ComptonAlvaro
Copy link

I have a database with two tables. One field is a nullable integer that when the POCO entity is created, the property is a long? so i guess that it could be a problem because a long can be bigger than an intenger. This can be see in the table "Contenidos", the field "Año".

Another case is in the table "Ficheros", field "SePuedeBorrar". In the database is a nullable bool, but when the POCO entity is created, the property is an string. This is not correct.

I have attached the database the produces this cases.

I am using Sqlite.Design version 1.1.2, Framework.Tools 1.1.1 and Sqlite 1.1.2.

Thanks.
Sqlite - scaffolding test.zip

@bricelam
Copy link
Contributor

bricelam commented Jun 19, 2017

SQLite has a dynamic type system. The user-specified column type name has almost no meaning. We currently apply the same type affinity rules as the database engine to pick the most likely candidate from one of the four primitive types supported by SQLite:

  • INTEGER (maps to long)
  • REAL (maps to double)
  • TEXT (maps to string)
  • BLOB (maps to byte[]).

#8824 is one idea we had to improve the reverse engineer process to produce more expected CLR types.

@bricelam bricelam removed this from the 2.0.0 milestone Jun 19, 2017
@bricelam bricelam removed their assignment Jun 19, 2017
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants