Fixed
Status Update
Comments
se...@google.com <se...@google.com> #2
The generated dao code has this line:
_observer = new Observer("book","split")
I think annotation processor should handle this type usages of FROM clause.
I found a workaround for this problem. I created an unused entity named "Split" and it works.
_observer = new Observer("book","split")
I think annotation processor should handle this type usages of FROM clause.
I found a workaround for this problem. I created an unused entity named "Split" and it works.
fl...@google.com <fl...@google.com>
yb...@google.com <yb...@google.com> #3
yea we should fix the query parser to understand WITH. Btw, WITH queries are available only in recent versions of SQLite (need to double check but i think it was android 21 +).
yb...@google.com <yb...@google.com> #4
Yigit, I think you assigned this bug to me by mistake. I do not work on this project.
yb...@google.com <yb...@google.com> #5
sorry, bad autocomplete :/.
Description
Version used: 1.0.0-alpha8
Given the following entity:
@Entity(tableName = "foo")
public class FooEntity {
@PrimaryKey
@ColumnInfo(name = "bar")
private String bar;
@ColumnInfo(name = "baz")
private String baz;
public FooEntity(String bar, String baz) {
this.bar= bar;
this.baz= baz;
}
}
I'm able to insert the follwing entities into the database without errors:
new FooEntity(null, "one");
new FooEntity(null, "two");
new FooEntity(null, "three");
Is this behaviour intended? Should PrimaryKey columns be NonNull by default (not sure especially with multi column primary keys and auto increment columns)?
If null is a valid value for a primary key column, I believe there should by a primary key violation if I try to put the same key multiple times into the table.