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
1 answer

Concurrent insertion of dao with greendao; Database is locked when executing BEGIN EXCLUSIVE

We are testing greendao for concurrency issues when there are two different threads within the same process trying to persist at the same time. We spawn two threads in the same process and are having them insert 100, randomly populated, dao's at the…
prolink007
  • 33,872
  • 24
  • 117
  • 185
0
votes
1 answer

greenDAO testSuiteConstructionFailed error when testing entities

I have tried writing test cases in JUnit using the greenDAO sample app as an example, but I get a RuntimeException caused by InvocationTargetException: It doesn't even run the tests. Below is the code that is barfing this up: import…
Ralph Pina
  • 761
  • 7
  • 16
0
votes
0 answers

android greenDao - upon query using generated Get function

upon query using generated Get function - I'm getting the following list of entity [null] how could it be?
Nativ
  • 3,092
  • 6
  • 38
  • 69
0
votes
1 answer

greendao and sqlite triggers

I tried to use the code below to ensure referential integrity in my database, but seems not to be working with GreenDao. I can still delete all the records. On the other hand, when I try to delete in Sqlitemanager, the trigger is raised and delete…
GoranK
  • 1,628
  • 2
  • 12
  • 22
0
votes
2 answers

Greendao: insert, update, delete Syntax, Best practice

I have asked similar question here but i didnt got any satisfactory response, so please understand my concern: 1. https://stackoverflow.com/questions/14846105/insert-ot-update-using-one-of-the-field-as-key-in-greendao 2.…
Rushi
  • 144
  • 3
  • 14
0
votes
1 answer

Modelling To-Many Relation To Superclass Object

I started my work with greenDAO project, which I want to use to simplify database operation in my Android project. So, I would like to create a relation schema in seperated Java generator project. My aim is to implement a superclass, from which…
Siwy
  • 3
  • 2
0
votes
0 answers

Best way to select row with following scenario using greenDao?

I have 3 tables : Manager: manager_id, taluka_name Employee: employee_id, employee_manager_id Target: target_id, target_employee_id Now i have to show a ListView of all the targets taluka_name wise. I am using greenDao for the…
Rushi
  • 144
  • 3
  • 14
0
votes
2 answers

How to compile greenDao example without eclipse?

How to compile GreenDao examples and DaoExampleGenerator without eclipse?
David Chyi
  • 159
  • 1
  • 9
0
votes
1 answer

Why DaoMaster does not have a non-abstract OpenHelper class?

why the generated code of greendao does not provide a non-abstract OpenHelper class from the DaoMaster? It only provides the DevOpenHelper, which I assumed only for development mode. Steve
user207253
  • 381
  • 1
  • 3
  • 4
0
votes
1 answer

GreenDao reset daoSession on deserialization

I use serialization but when I deserialize an object and I try to resolve a relation I catch this exception: Entity is detached from DAO context I think because the daoSession and myDao are transient and are nullified on serialization. How can I…
0
votes
1 answer

Insert a relation

I have a relation: an order contains many order-items. I'd like to insert it a single statement rather than: inserting order, obtaining generated order id, setting order-id for every order-item and finally inserting order-items. For instance: Order…
midnight
  • 3,420
  • 3
  • 36
  • 58
0
votes
2 answers

Date with set fields gives arbitrary values every time it's invoked

I'm trying to work with dates in sqlite and I need a way of comparing them. My issue is that when I try to save a setup date into the database it gives me new values; They however don't differ much - just in milliseconds. Here's the code: Date today…
midnight
  • 3,420
  • 3
  • 36
  • 58
0
votes
1 answer

GreenDao library(SQL) Self table Many-To-Many

I'm trying to build self many to many relation for USER table to itself - USER table. The idea is that each user might have some friends users and vice versa. I'm doing it with a junction function but then when I'm trying to compile it I'm getting…
Nativ
  • 3,092
  • 6
  • 38
  • 69
-1
votes
1 answer

Android: caching SQLite entities in memory

What approach should I use to minimize disk i/o when reading/writing to SQLite database in Android? Something like ConcurrentHashMap with WeakReferences? Caffeine? GuavaCache? Should I use built-in caches in ORMs like GreenDao, DBFlow, ORMLite? The…
FelisManulus
  • 440
  • 4
  • 18
-1
votes
1 answer

ORM/Database library to persist external objects in Android

I'm writing an Android app where I have to persist objects, but these objects come from a dependency. I've taken a look at libraries like Realm, GreenDAO, SugarORM, ActiveAndroid, ORMLite, etc., but all of these require access to the source files…
Vedavyas Bhat
  • 2,068
  • 1
  • 21
  • 31
1 2 3
39
40