-
Notifications
You must be signed in to change notification settings - Fork 51
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
IllegalArgumentException: Proper ID is not defined for field. when id is in super object #15
Comments
For me, this is caused by proguard.. and I don't know how to pass it |
Thank you for reporting! I plan to check it. |
Hi @phantomis |
For me the reason of this exception is different. My ID field is not generated locally and thus I don't use "generatedId=true". |
@suntehnik |
This is crap! OrmLite do supports You only need to add 2 lines to support them into your
Or you can download my |
@nono240 |
@jakenjarvis : my code was only a proof of concept. You'll probably have to slightly improve your code to correctly handle fields visibility as ormlite do: you must ignore |
@nono240 We should read all fields where a @DatabaseField annotation was specified. So I judged, there is no need to ignore a private field. I think your concept is not wrong. :) |
No, OrmLite ignore private fields on superclasses.
|
He said:
and
That's Access level modifiers does not matter.(Of course, the private fields are ignored by default. However, We should read all fields where a @DatabaseField annotation was specified.) Line 82 in b913d92
while(targetTableClassType != null) {
for (Field classfield : targetTableClassType.getDeclaredFields()) {
if (classfield.isAnnotationPresent(DatabaseField.class)) { |
Ok, but it could be worth to give it a try.
Thanks for great library.
|
Any update on this? |
@renaudcerrato Sorry and thanks for waiting. I for a while, was very busy. I during the holidays of several days, worked on this project. Result of verifying the Superclass of ORMLite: The reason is because the test code of testDoORMLiteCanBeAccessToThePrivateMembersOfSuperclass() has been finish successfully. Also, I was searching for Modifier.isPrivate from within the source code of ORMLite, I could not find it. Field is required Modifier.isPrivate is in order to determine whether it is private. For this reason, I was convinced that it is not aware of the access modifier in ORMLite. Then, I have uploaded the 1.0.5-SNAPSHOT. If possible, please try using. :) |
1.0.5-SNAPSHOT sounds fine =) Any official release? |
Hey mate - any chance of a release? |
Waiting for official release of this. |
Might also be because you didn't use a column name containing _ID like this :
|
When creating TableInfo only fields of top level class are used. In my case I have id set in super class and i get error because ID field was not found.
It should also check for fields in all super classes.
The text was updated successfully, but these errors were encountered: