-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Custom primary key type generate wrong code #1051
Comments
passos
added a commit
to passos/greenDAO
that referenced
this issue
Aug 6, 2020
fix for issue greenrobot#1051 When primary key is a custom type, the generated code for updateKeyAfterInsert and getKey will return String but the actual primary key is not.
This was referenced Aug 6, 2020
passos
added a commit
to passos/greenDAO
that referenced
this issue
Aug 11, 2020
fix for issue greenrobot#1051 When primary key is a custom type, the generated code for updateKeyAfterInsert and getKey will return String but the actual primary key is not.
passos
changed the title
Customize primary key type doesn't work
Custom primary key type generate wrong code
Aug 11, 2020
passos
added a commit
to passos/greenDAO
that referenced
this issue
Aug 11, 2020
fix for issue greenrobot#1051 When primary key is a custom type, the generated code for updateKeyAfterInsert and getKey will return String but the actual primary key is not.
passos
added a commit
to passos/greenDAO
that referenced
this issue
Aug 11, 2020
When primary key is a custom type, the generated code for updateKeyAfterInsert and getKey will return String but the actual primary key is not. see greenrobot#1051 for details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
== Summary ==
When primary key is a custom type, the generated code for updateKeyAfterInsert and getKey will use String as return type instead of the actual custom type, which will cause compile error.
-- code to reproduce --
the generated ExampleDao would be
The problem is the custom type was not considered when set up the value for
pkType
of Entity, which is processed inEntity.java
Also, if Entity was generated programmatically, for example
then the generated Entity code would be
which
String id
should beUUID id
.Please see PR #1053 for fix details
The text was updated successfully, but these errors were encountered: