Class cannot be read from Sqlite3 database
See original GitHub issueError: Class cannot be read from Sqlite3 database. Please check the type of field usersReviewList(java.util.ArrayList)
Hi, sugarORM can not read from the database fields stored in a custom object called UserReview in practice in my code I have an object called appWatched and for each object can have multiple objects UserReview which for convenience are saved in a list , when I try to read data stored in the database sugar fails to read the values stored in the table USER_REVIEW , how do I fix ? an extract from the code of java objects :
public class AppWatched extends SugarRecord<AppWatched>{
private String appPackageName;
private String appName;
private String appLogoUrl;
private String vote;
private String numPeapleRating;
private String numStarsRatingFive;
private String numStarsRatingFour;
private String numStarsRatingThree;
private String numStarsRatingTwo;
private String numStarsRatingOne;
private List<UserReview> usersReviewList;
public AppWatched(){ }
}
public class UserReview extends SugarRecord<UserReview>{
private String userAvatarUrl;
private String userName;
private String currentRation;
private String reviewDate;
private String reviewTitle;
private String reviewBody;
public UserReview() {}
}
Used Version: compile ‘com.github.satyan:sugar:1.3’
Issue Analytics
- State:
- Created 8 years ago
- Comments:7
Top Results From Across the Web
Android Sugar ORM - Class model with list - Stack Overflow
Class cannot be read from Sqlite3 database. Please check the type of field myStringList(java.util.List). The line:
Read more >android.database.sqlite - Android Developers
SQLiteAccessPermException, This exception class is used when sqlite can't access the database file due to lack of permissions on the file.
Read more >SQLite Android Bindings: SQLiteStatement.java at tip
ParcelFileDescriptor; /** * Represents a statement that can be executed against a database. The statement * cannot return multiple rows or columns, ...
Read more >core/java/android/database/sqlite/SQLiteOpenHelper.java
public abstract class SQLiteOpenHelper implements AutoCloseable { ... Write-ahead logging cannot be used with read-only databases so the value of.
Read more >Android SQLite Database Example Tutorial - DigitalOcean
We define a DBManager class to perform all database CRUD(Create, Read, Update and Delete) operations. Opening and Closing Android SQLite ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, it’s 2018 and it’s crazy how such an important thing is missing. I found this way to be quite helpful: Basically storing it as a string json https://stackoverflow.com/a/46543631/3520157
ArrayList or other collections aren’t supported yet 😦
Only solution and then create a report 1 to n between my items , thanks