Questions tagged [android-orm]
11 questions
15
votes
2 answers
Android Room FOREIGN KEY constraint failed
I'm trying to design and implement a folder tree structure in Android SQLite with help of Android Room Persistence (an ORM) which Google introduced in I/O 2017.
In my design, a folder can contain another folders and files.
Here are my codes for…

Hamidreza Sahraei
- 457
- 1
- 5
- 13
2
votes
2 answers
Best way to use Realm database
using this code:
public class App extends Application {
private static App instance;
@Override
public void onCreate() {
super.onCreate();
initRealmDB();
}
…

Erum
- 790
- 3
- 14
- 36
1
vote
2 answers
Android Room FOREIGN KEY constraint failed (code 787) when insert new row
I followed this post Android Room FOREIGN KEY constraint failed (code 787). Unfortunately, it not works in my case.
I always get the error when trying to insert a new Note. Of course, there is a Topic existed in Database.
Do you guys have any…

Gold Chicken
- 333
- 6
- 15
1
vote
2 answers
Android Room FOREIGN KEY constraint failed (code 787)
I'm tying to create a database in Android Room with two foreign keys. Every time I try to insert a track into the database the program chrashes and says that the "foreign key costraint failed(code 787)". Maybe someone of you knows why and can help…

Felix
- 105
- 1
- 2
- 11
1
vote
1 answer
Room how to model Entity with nested collections
I try to refactor some code and move several architecture to use Room Database from architecture components.
I have such object, which i use often, getting it from cache.
Here what it looks like:
public class LocationEvents {
private…

K.Os
- 5,123
- 8
- 40
- 95
0
votes
1 answer
How to store byte[] in ORMLite Android?
This may be a duplicate question but none of the previous answer could work for me.
I am trying to store the byte[] in ormlite but I am getting following error.
java.sql.SQLException: ORMLite does not know how to store class [B for field…

Afsar edrisy
- 1,985
- 12
- 28
0
votes
1 answer
Could not find io.objectbox:objectbox-gradle-plugin:1.3.3
I am trying to integrate object box in my existing android project but getting error.
Is there any JAVA 8 version issue or object box compatibility issue.
is there any gradle version and object box compatibility issue. i am stuck at this point.…

Swapnil
- 654
- 7
- 27
0
votes
1 answer
Room - Query all memory handling
I'm considering using the android Room library as a ORM in my app, but i would like to know more details/comments because of some constraints i have and i was not able to find on the internet (ie.Google;))
When i do the following…

Sergio Lima
- 114
- 13
0
votes
0 answers
SQLiteException: no such table: APPOINTMENT (code 1) while using Sugar ORM 1.4
I want to use Sugar ORM 1.4, followed instructions on This Page, added dependency
dependencies {
...
compile 'com.github.satyan:sugar:1.4'
}
Manifest.xml is

Arshad Ali
- 3,082
- 12
- 56
- 99
0
votes
5 answers
How to retrieve a single column data from a Android sugar orm database
I have created a Sugar ORM database successfully in my app, I can update, delete and also get all data from a row, but I want a single column data matched with another data...
I mean, I have a registration database with fields: username, password,…

Shovon Mohonto
- 11
- 2
- 6
-1
votes
2 answers
error: cannot find symbol method getColor(Context,int) after adding Sugar ORM to project
I would like to use SugarOrm in my app.
If I add the followings:
compile 'com.github.satyan:sugar:1.4'
to the gradle file
and
android:name="com.orm.SugarApp"
to my mainfest's application name
I get the following error on build:
Error:(75, 55)…

Adam Varhegyi
- 11,307
- 33
- 124
- 222