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

Ignore attribute on Inherited list not working #656

Open
mhmacleod opened this issue Nov 16, 2017 · 4 comments · Fixed by Adam-Langley/sqlite-net#1 · May be fixed by #1119
Open

Ignore attribute on Inherited list not working #656

mhmacleod opened this issue Nov 16, 2017 · 4 comments · Fixed by Adam-Langley/sqlite-net#1 · May be fixed by #1119

Comments

@mhmacleod
Copy link

Starting from version 1.3.2, When creating a table for a class that has a List property with an Ignore attribute, the error 'Don't know about List' is thrown.

This list originally came from a base class, and is subsequently overridden in the child class in order to furnish it with the [Ignore] attribute (the base class isn't exposed to SQLite reference dependency). My guess is it somehow referred back to the base class's property.

@ross-carter-csfd
Copy link

ross-carter-csfd commented Dec 1, 2017

I updated my project recently and have also encountered this issue!

Can we tag this as a bug?

@hvaughan3
Copy link

See #549

@andre-ss6
Copy link

andre-ss6 commented May 30, 2018

This is still happening running 1.4.118 (latest release) and it's been blocking me. I have a reproducible working sample here: https://github.com/andre-ss6/SQLiteIgnoreAttributeBugReport. While trying to debug this, I've noticed that the columns will appear duplicated (if you inspect the SQLiteConnection object under the debugger). I've tried to debug the source code for creating a table under the .NET Framework 4.7, but it seemed to be OK (the algorithm to get the list of columns from the list of properties of the type didn't seem to be the one responsible for duplicating). I then tried to see if there was something wrong with Mono's implementation of GetProperties() using some online C# compilers, but it seemed OK as well.

@Goncharuk-Nikita
Copy link

Same problem. Please fix it

Adam-Langley added a commit to Adam-Langley/sqlite-net that referenced this issue Jun 10, 2022
By manually traversing the object hierarchy, we can ensure all [Ignore] attributes, and attributes the derived from [IgnoreAttribute] are found.
Fixes praeclarum#1010
Fixes praeclarum#661
Fixes praeclarum#656
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants