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

How to use ignore annotation? #272

Closed
sanekyy opened this issue Feb 28, 2020 · 5 comments · Fixed by #279
Closed

How to use ignore annotation? #272

sanekyy opened this issue Feb 28, 2020 · 5 comments · Fixed by #279

Comments

@sanekyy
Copy link

sanekyy commented Feb 28, 2020

No description provided.

@mqus
Copy link
Collaborator

mqus commented Feb 28, 2020

Well, you put a @ignore(has to be lower case!) before your field(in a class which is marked as an Entity) to make floor ignore it. This means that it will not create a database column for it and your constructor should be able to handle a call without the ignored fields in it.

But as you didn't specify what exactly you don't understand, I can't help you much further.

@sanekyy
Copy link
Author

sanekyy commented Feb 29, 2020

Thanks. I can’t find an example with this annotation.

@sanekyy sanekyy closed this as completed Feb 29, 2020
@sanekyy
Copy link
Author

sanekyy commented Feb 29, 2020

I can't use this code:(

image

[SEVERE] floor_generator:floor_generator on lib/data/db/app_database.dart:
Error running FloorGenerator
Column type is not supported for BuiltList<Season>.
package:gohere/data/model/db/place.dart:44:25
   ╷
44 │   BuiltList<Season> get seasons {
   │                         ^^^^^^^
   ╵
[INFO] Running build completed, took 15.6s

@sanekyy sanekyy reopened this Feb 29, 2020
@vitusortner
Copy link
Collaborator

vitusortner commented Mar 2, 2020

Thanks for your report! Do you see a problem in ignoring all getters and setters out of the box? (This will require minor changes.)

@sanekyy
Copy link
Author

sanekyy commented Mar 5, 2020

Ignoring all getters and setters may be a good solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants