-
Notifications
You must be signed in to change notification settings - Fork 120
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
Support annotations for getter/setter properties #392
Comments
Thanks! It's odd that this doesn't work already. Also Edit: an internal issue for this exists. |
greenrobot-team
changed the title
@Property Annotation for getter/setter properties
Support annotations for getter/setter properties
Apr 18, 2023
Same for |
Also freezed classes with non-required properties are affected by this, see #565. |
greenrobot-team
added a commit
that referenced
this issue
Feb 12, 2024
Support annotations on getters See merge request objectbox/objectbox-dart!69
Annotating getters will be possible with the next release. You will be able to do something like this: @Property(type: PropertyType.date)
@Index()
DateTime get date => TODO;
set date(DateTime value) => TODO;
@Transient()
int get computedValue => TODO;
set computedValue(int value) => TODO; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the @Property Annotation is only available for fields, that are defined as such in the @entity.
Describe the solution you'd like
It would be nice to be able to add the @Property Annotation also to a getter (assuming a matching setter exists). This would just have the same effect on the property defined by the getter / setter pair as if it would have, would the annotation be attached to an equivalent field.
The text was updated successfully, but these errors were encountered: