Fixed
Status Update
Comments
yb...@google.com <yb...@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.
wo...@gmail.com <wo...@gmail.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 +).
wo...@gmail.com <wo...@gmail.com> #4
Yigit, I think you assigned this bug to me by mistake. I do not work on this project.
mm...@commonsware.com <mm...@commonsware.com> #5
sorry, bad autocomplete :/.
wo...@gmail.com <wo...@gmail.com> #6
shaileshprasad601@gmail.com updation and bachelor uptodate Country INDIA 800020 on 20.10.2017 with ids TxPy id AJGPP7219K UIDAI 548028010019 voters id JDK1934249 please uptodate in your records.
yb...@google.com <yb...@google.com> #7
The House of Books is a haven for book lovers, filled with timeless stories and knowledge. From bestsellers to rare collections, there's something for everyone. Explore captivating tales, expand your horizons, and get lost in the magic of reading. Visit us today and find your next favorite book. Visit https://houseofbooks.pk/products/stories-from-quran-of-prophets-20-pcs-books-set
wo...@gmail.com <wo...@gmail.com> #8
Nice, when will this come out?
Currently I'm heading towards sqldelight for all module entities and would like to switch back to room before our next release.
Currently I'm heading towards sqldelight for all module entities and would like to switch back to room before our next release.
yb...@google.com <yb...@google.com> #9
if you are using kotlin, it will come out in a couple of hours.
for java, might take longer
for java, might take longer
yb...@google.com <yb...@google.com> #10
s/might/will
wo...@gmail.com <wo...@gmail.com> #11
Nice, thanks for adressing this :)
Nope, no java in here ;)
Nope, no java in here ;)
yb...@google.com <yb...@google.com> #12
1,1-alpha2 is out now, lmk if it works.
wo...@gmail.com <wo...@gmail.com> #13
Thanks. It's partly fixed. I updated my sample project:
https://github.com/PaulWoitaschek/RoomMultiModuleBug
The property names on the data classes do now work. The dao interface parameter names don't work and still have to be called arg0 etc.:
https://github.com/PaulWoitaschek/RoomMultiModuleBug/blob/master/library/src/main/java/de/paul_woitaschek/roombug/library/LibraryDao.kt#L10
The property names on the data classes do now work. The dao interface parameter names don't work and still have to be called arg0 etc.:
wo...@gmail.com <wo...@gmail.com> #14
It looks like you can use the metadata annotation for interfaces too.
For example if I have this simple dao interface:
https://gist.github.com/PaulWoitaschek/e26d0e4f53460710c8caba9e995eb06d
It will producte the following Metadata annotation in byte code:
d2={"Lcom/yazio/android/misc/repo/MyDao;", "", "get", "Ljava/io/File;", "id", "", "production sources for module app"})
So all the information we need is there.
For example if I have this simple dao interface:
It will producte the following Metadata annotation in byte code:
d2={"Lcom/yazio/android/misc/repo/MyDao;", "", "get", "Ljava/io/File;", "id", "", "production sources for module app"})
So all the information we need is there.
yb...@google.com <yb...@google.com> #15
thanks. i'll take a look at it.
yb...@google.com <yb...@google.com> #16
ugh my bad, i totally missed the part about parsing dao methods :/ .
wo...@gmail.com <wo...@gmail.com> #18
Works, thank you!
be...@gmail.com <be...@gmail.com> #19
Hi, I have used "1.1.0-alpha3" but the problem still happened. When I builded the project, there showed some error like this:
错误: Each bind variable in the query must have a matching method parameter. Cannot find method parameters for :userIds.
错误: Unused parameter: arg0
错误: Each bind variable in the query must have a matching method parameter. Cannot find method parameters for :first, :last.
错误: Unused parameters: arg0,arg1
4 个错误
Here is my projecthttps://github.com/beyondbright/AndroidArchitectureSample
Did I miss something? Please help me. Thanks.
错误: Each bind variable in the query must have a matching method parameter. Cannot find method parameters for :userIds.
错误: Unused parameter: arg0
错误: Each bind variable in the query must have a matching method parameter. Cannot find method parameters for :first, :last.
错误: Unused parameters: arg0,arg1
4 个错误
Here is my project
Did I miss something? Please help me. Thanks.
wo...@gmail.com <wo...@gmail.com> #20
Yes, you need to use kotlin if you want that. The information gets not contained in the way it works right now for java.
Maybe reopen the issue till it's fixed for java too, Yigit?
Maybe reopen the issue till it's fixed for java too, Yigit?
be...@gmail.com <be...@gmail.com> #21
Everything was OK before I put the UserDao into the library module.
be...@gmail.com <be...@gmail.com> #22
Sorry. I know it now. But I use java not kotlin.
I can not use room in our project because of the issue. There are some modules in our project and I have to put the Dao into the library module.
Really hope it works for java.
I can not use room in our project because of the issue. There are some modules in our project and I have to put the Dao into the library module.
Really hope it works for java.
ka...@beehyv.com <ka...@beehyv.com> #23
I am using the java module 2.2.2 and still getting the same errors. However when I build again, it goes away, but having to build the module multiple times is really annoying.
yb...@google.com <yb...@google.com>
ra...@gmail.com <ra...@gmail.com> #24
Still the same problem in 2021. Always need to compile twice. This bug is not "fixed" (for Java)!
da...@google.com <da...@google.com> #25
Use javac -parameters
compiler flag so parameter names are compiled into the .class files and Room is able to read them when inspecting compiled code.
See
fa...@gmail.com <fa...@gmail.com> #26
I have the same problem again using Kotlin 1.7.10.
Does anyone know if this bug just appeared again?
Does anyone know if this bug just appeared again?
mo...@mindtickle.com <mo...@mindtickle.com> #27
yes, I'm facing this issue on kotlin version 1.9.20 as well. Has anyone found any solution for this other than naming arguments to arg0 etc?
du...@gmail.com <du...@gmail.com> #28
I am also facing this problem with Kotlin 1.9.23, please help to check. I don't want to rename to arg0, arg1,...
Description
Version used: 1.0.0-beta2
Devices/Android versions reproduced on:
Consider the following code, added in an android library module (AAR):
@Entity(tableName = "my_table")
public class MyTable {
@PrimaryKey
@NonNull
public String id;
}
@Dao
public interface MyTableDao {
@Query("SELECT * FROM my_table WHERE id = :id")
LiveData<List<MyTable>> sampleQuery(String id);
}
The actual database is instantiated in the app module. When compiling, I receive the following error:
Error:Each bind variable in the query must have a matching method parameter. Cannot find method parameters for :id.
Error:Unused parameter: arg0
Renaming ":id" to ":arg0" in the query fixes the issue. It seems that AAR packages lose the parameter names, and this causes Room to fail to bind the parameters correctly. A similar issue happens when an entity constructor has a parameter ("Error:Entities and Pojos must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type).").