Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
Is there any hope that this will be looked at any time soon?
I find it pretty disappointing that there is no way to debug queries. I am using Room in an application with foreign key relationships, and these are failing silently and for some mysterious reason, and I have no way to debug my queries other than manually adding a bunch of LogCat logs.
Thank you for considering this.
I find it pretty disappointing that there is no way to debug queries. I am using Room in an application with foreign key relationships, and these are failing silently and for some mysterious reason, and I have no way to debug my queries other than manually adding a bunch of LogCat logs.
Thank you for considering this.
t....@gmail.com <t....@gmail.com> #3
Hello
Room database looks very promising and interesting, But I am still on initial stage of learning it and I am facing the problem of not being able to see log outputs of the database.
While implementing / learning debugging should be enabled.
It would be extremely helpful if we can have debugging logs for Room database implementation.
Thanks and regards
Abhiroop Nandi Ray
Room database looks very promising and interesting, But I am still on initial stage of learning it and I am facing the problem of not being able to see log outputs of the database.
While implementing / learning debugging should be enabled.
It would be extremely helpful if we can have debugging logs for Room database implementation.
Thanks and regards
Abhiroop Nandi Ray
bu...@gmail.com <bu...@gmail.com> #4
sorry, we are not agianst this feature but it is just not a high priority right now.
You can technically implement this outside room by providing your logging support sqlite open helper.
you can also consider sending a CL ? :)
https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev
You can technically implement this outside room by providing your logging support sqlite open helper.
you can also consider sending a CL ? :)
yb...@google.com <yb...@google.com>
yb...@google.com <yb...@google.com> #5
si...@gmail.com <si...@gmail.com> #6
yb...@google.com <yb...@google.com> #7
This is needed for asserting query execution and increasing the speed of adoption of the framework. Please prioritize higher as simple as it is.
da...@google.com <da...@google.com> #8
Please, it would be very helpful for developers to be able to debug room operations in an easy way.
ap...@google.com <ap...@google.com> #9
Please, it would be very helpful for a more complicated erd, prioritize higher as soon as possible.
Description
Version used: 1.0.0-rc1
Devices/Android versions reproduced on: compile
These are my entity and dao classes.
----------------------------------------------------------------------------------------------------------
@Entity
public class Playlist {
@PrimaryKey(autoGenerate = true) private int id;
private String name;
private String path;
@ColumnInfo(name = "icon_path") private String iconPath;
private int type;
@ColumnInfo(name = "date_created") private long dateCreated;
@ColumnInfo(name = "date_last_opened") private long dateLastOpened;
public int getId() {
return id;
}
public void setId(int id) {
}
public String getName() {
return name;
}
public void setName(String name) {
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getIconPath() {
return iconPath;
}
public void setIconPath(String iconPath) {
this.iconPath = iconPath;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public long getDateCreated() {
return dateCreated;
}
public void setDateCreated(long dateCreated) {
this.dateCreated = dateCreated;
}
public long getDateLastOpened() {
return dateLastOpened;
}
public void setDateLastOpened(long dateLastOpened) {
this.dateLastOpened = dateLastOpened;
}
}
----------------------------------------------------------------------------------------------------------
@Dao
public interface PlaylistDao {
@Query("SELECT * FROM playlist")
List<Playlist> getAll();
@Insert
void insert(Playlist playlist);
@Delete
void delete(Playlist playlist);
}
----------------------------------------------------------------------------------------------------------
I'm getting compile time error that cannot find getter for id and iconPath field.
----------------------------------------------------------------------------------------------------------
Playlist.java:15: error: Cannot find getter for field.
@PrimaryKey(autoGenerate = true) private int id;
^
Playlist.java:18: error: Cannot find getter for field.
@ColumnInfo(name = "icon_path") private String iconPath;
^
----------------------------------------------------------------------------------------------------------
While I looked into generated PlaylistDao implementation class, i saw that 'İ' is used as uppercase of 'i'.
----------------------------------------------------------------------------------------------------------
public List<Playlist> getAll() {
final String _sql = "SELECT * FROM playlist";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
final Cursor _cursor = __db.query(_statement);
try {
final int _cursorIndexOfİd = _cursor.getColumnIndexOrThrow("id");
final int _cursorIndexOfName = _cursor.getColumnIndexOrThrow("name");
final int _cursorIndexOfPath = _cursor.getColumnIndexOrThrow("path");
final int _cursorIndexOfİconPath = _cursor.getColumnIndexOrThrow("icon_path");
final int _cursorIndexOfType = _cursor.getColumnIndexOrThrow("type");
final int _cursorIndexOfDateCreated = _cursor.getColumnIndexOrThrow("date_created");
final int _cursorIndexOfDateLastOpened = _cursor.getColumnIndexOrThrow("date_last_opened");
final List<Playlist> _result = new ArrayList<Playlist>(_cursor.getCount());
while(_cursor.moveToNext()) {
final Playlist _item;
_item = new Playlist();
_
final String _tmpName;
_tmpName = _cursor.getString(_cursorIndexOfName);
_item.setName(_tmpName);
final String _tmpPath;
_tmpPath = _cursor.getString(_cursorIndexOfPath);
_item.setPath(_tmpPath);
_item.iconPath = _cursor.getString(_cursorIndexOfİconPath);
final int _tmpType;
_tmpType = (int) _cursor.getInt(_cursorIndexOfType);
_item.setType(_tmpType);
final long _tmpDateCreated;
_tmpDateCreated = _cursor.getLong(_cursorIndexOfDateCreated);
_item.setDateCreated(_tmpDateCreated);
final long _tmpDateLastOpened;
_tmpDateLastOpened = _cursor.getLong(_cursorIndexOfDateLastOpened);
_item.setDateLastOpened(_tmpDateLastOpened);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
_statement.release();
}
}
----------------------------------------------------------------------------------------------------------
I'm using Turkish keyboard. I tried changing my keyboard input as English and wrote entity class again. I also tried convert file encoding of playlist class but the problem was not solved.
It only compile without error when i change getters with getİd and getİconPath.