@NameInDb does not work
See original GitHub issueIssue Basics
- ObjectBox version (are using the latest version?): 1.4.0
- Reproducibility: always
Reproducing the bug
Description
Queries do not find the proper field on db when the field is renamed using @NameInDb
Code
@Entity
public class MyClass {
@Id
long id;
@NameInDb("someField")
String mSomeField;
}
List<MyClass> result = mBox.query()
.equal(MyClass_.mSomeField, "some value")
.build()
.find();
Logs & stackstraces
Caused by: io.objectbox.exception.DbException: Could not prepare entity field MyClass.someField (Ljava/lang/String;) - does the field exist with the expected type?
at io.objectbox.query.Query.nativeFind(Native Method)
at io.objectbox.query.Query$3.call(Query.java:227)
at io.objectbox.query.Query$3.call(Query.java:224)
at io.objectbox.BoxStore.callInReadTx(BoxStore.java:668)
at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:614)
at io.objectbox.query.Query.callInReadTx(Query.java:304)
at io.objectbox.query.Query.find(Query.java:224)
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
android - Greendao Autoincrement inserting record not working
I have used it as below and it is working fine. @Entity(nameInDb = "cities") public class City { @Id(autoincrement = true) private Long...
Read more >[pset8] finance - check: javascript does not work : r/cs50 - Reddit
I am struggling with the part of check that checks if the username is taken via javascript. My javascript code seems not to...
Read more >yun_dao - Dart API docs - Pub.dev
1.Create entity file which names *_entity. · 2.Use @Entity to annotate entity class; use nameInDb property to define the database table name of...
Read more >Java Release History (<= v1.5) - ObjectBox Docs
Entity can be named Property , no longer conflicts with ObjectBox Property class. Property queries for strings crashed on some Android devices if...
Read more >Modelling entities - Open Source by greenrobot
// Specifies the name of the table in the database. // By default, the name is based on the entities class name. nameInDb ......
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 Free
Top 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
Will look into this for the upcoming version. Thanks for reporting.
Fixed, please confirm with V1.4.4