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
Field types that have no empty constructor will fail to compile #3
Comments
Thanks for your testing. I will take a look inside this and i think giving the annotation a default value would be a good way. |
If no default value is provided with the annotation it should return null. |
Absolutely, that should do the trick |
compile 'io.fabianterhorst:iron-annotations:0.2'
|
edit:apt 'io.fabianterhorst:iron-compiler:0.4' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try defining a field of type Long inside a @Store model. It will fail to compile due to the fact that java.lang.Long has no empty constructor
May I recommend checking for the field type and acting accordingly? So, if String then new java.lang.String() will work, but if Long, Boolean, Byte, etc then the default value should be 0, false, etc (or just always return null, I mean, a null-check is pretty much common)
The text was updated successfully, but these errors were encountered: