Questions tagged [greendao]

greenDAO is an object/relational mapping (ORM) tool for Android. It offers an object oriented interface to the relational database SQLite. ORM tools like greenDAO do many repetitive tasks for you and offer a simple interface to your data.

greenDAO's primary features:

  • Fast & slim: designed for Android and SQLite
  • Support for entity relations
  • Query builder
  • Code generation

Links:

592 questions
0
votes
2 answers

Does greenDao support (or have plans to support) annotation processing?

I'm looking into greenDAO as an option for our database mapping needs. I noticed that greenDao does not use annotation processing, but instead uses a handmade java program to generate the source code. Having just finished a small utility which uses…
AngraX
  • 1,803
  • 2
  • 18
  • 30
0
votes
2 answers

How to model a bidirectional One2One-relation using greendao?

I have 2 entities, for example car and engine. Each car has one engine (at least in this model :) ), but not every engine is built into a car. So I want the following table-structure: +------------------------------------+ |CAR …
AlexS
  • 5,295
  • 3
  • 38
  • 54
0
votes
1 answer

DaoExample , Android Studio: R package does not exisists

I've just downloaded DaoExample from https://github.com/greenrobot/greenDAO. After that, I copy grade/ and gradlew/ from a HelloWorld project of Android Studio into DaoExample/ folder, then: ./gradlew build in my terminal. but I get the error: R…
Bùi Văn Thủ
  • 353
  • 4
  • 14
0
votes
2 answers

Add a library from Github to Android Studio 0.2.8

I am trying to add a library greenDAO from Github to an Android project created in Android Studio. The content of latest build.gradle created are as follow buildscript { repositories { mavenCentral() } dependencies { …
Gaurav Agarwal
  • 18,754
  • 29
  • 105
  • 166
0
votes
1 answer

Update a composed entity in greenDao

Let say i have a business domain in which there are two entities, Survey and Question, in OOP terms, the Survey has QuestionsList, the greenDao generation getQuestions method which returns a list of questions resolving 1:M relation from Survey to…
Abdul Samad
  • 526
  • 5
  • 13
0
votes
0 answers

Dao Test - java.lang.RuntimeException Could not find test class

I've generated a class and test using greendao 1.3.1 Everything looks OK; However, I am unable to run the generated dao test. A java.lang.RuntimeException is raised stating that "Could not find test class". My other Android test cases run just…
Lee
  • 567
  • 5
  • 18
0
votes
1 answer

Access GreenDAO generator project dynamically from Android project

Is it possible, from an Android project using GreenDAO, to dynamically (at run-time) access database model structural information (entities, properties, Schema, ...) defined in the generator project? My first impression is that it's not possible. If…
Esp
  • 1
  • 2
0
votes
2 answers

Android Studio, NavDrawer and support library issues

I have a problem using the android support library in my Android Studio project using gradle. If I add the support-library as dependency I will receive and "Error: Gradle: Execution failed for task ':AppName:dexDebug'. I have done a some researches…
0
votes
1 answer

Entity with multiple one-to-many relations of the same type and GreenDAO

The entities generate by GreenDAO must be something like this: class A { public List bList1; public List bList2; } class B{ ... } I know how it works with on list of a given type. The problem is that I'm not sure if the…
Natanael
  • 2,290
  • 6
  • 23
  • 35
0
votes
1 answer

greenDAO: can I use gen folder in android-project?

I'd like to use greenDAO for my project. Will there be any problems, if I use the folder 'gen' as generation target? 'gen' is generated by the ADT for working the the R.java files?
keineantwort
  • 873
  • 8
  • 15
0
votes
2 answers

Android - SQLite - no such column error (greenDAO)

I created my table structure with greenDAO and when updating the following table, I'm getting the follwing error: android.database.sqlite.SQLiteException: no such column: BODY_LOG_ENTRY._id: , while compiling: UPDATE BODY_LOG_ENTRY SET…
prom85
  • 16,896
  • 17
  • 122
  • 242
0
votes
2 answers

Greendao-orm database locked error

I've got locket database error using greendao. I use correct the libraries, everything worked for a while, but suddenly I receive the following: (I have HTC Desire with JB 4.2.2. AOPK) NoClassDefFoundError 05-21 19:45:47.639:…
0
votes
0 answers

InsertOrReplace entity without overriding specified parameter

I'm having the following issue with GreenDao and don't know how to solve it. I have some entity - lets say USER, that has 4 potentials param:FIRST_NAME,LAST_NAME,AGE,LOCAL_VAL and when I'm getting a USER from the server it has only 3 params:…
Nativ
  • 3,092
  • 6
  • 38
  • 69
0
votes
1 answer

is there an equivalent to CoreData and AFIncrementalStore in Android

Our data in our Android app has started to get more complex and is being updated. So, I need to persist relational data that I am pulling from our backend via REST json services. I'm thinking I should use a SQL lite data store on the android…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
0
votes
0 answers

Sort large amount of data before inserting to database

I need to download a large json String. I'm using aQuery for this. Then I need to parse this string in a list of objects (10k +) (I'm using Gson library for this) and insert this list to database (created with GreenDAO). But before inserting I need…
Lingviston
  • 5,479
  • 5
  • 35
  • 67