Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Class cannot be read from Sqlite3 database

See original GitHub issue

Error: 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:open
  • Created 8 years ago
  • Comments:7

github_iconTop GitHub Comments

pratiksaboocommented, Jun 1, 2018

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

pietronaccaricommented, Jul 1, 2015

ArrayList or other collections aren’t supported yet 😦

Only solution and then create a report 1 to n between my items , thanks

Read more comments on GitHub >

github_iconTop 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: at tip
ParcelFileDescriptor; /** * Represents a statement that can be executed against a database. The statement * cannot return multiple rows or columns, ...
Read more >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found