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

How to dynamically create table in database using greendao or ORMLite?

How to dynamically create table in database using greendao or ORMLite? I want to create new table in database when user pressed button, for each new table in database, data model is same but I need table with diffrent name. Is that possible ?
eJoe
  • 485
  • 1
  • 7
  • 18
0
votes
2 answers

How to find birthdays ranging between two dates using sqlite?

I am using greendao or sqlite and my model (User) has a DOB column which stores the birthdate of the user. How can I find the users which have birthday between a range of dates? I am using following query in mysql but cannot find a way to do this…
Anuj
  • 1,160
  • 2
  • 20
  • 40
0
votes
1 answer

Android saving decimal data in database using greendao

I use GreenDao as My ORM in Android and I want to have a Decimal column in one of my tables, but GreenDao do not have Decimal DataType. Double and Float shown with scientific notation, But i want to show its real value. One solution is to write a…
SerCna
  • 278
  • 2
  • 12
0
votes
1 answer

java.lang.IllegalStateException: get field slot from row 0 col 25 failed

I am trying to create a android app using GreenDAO, this is ERP kind of project so practically it is not possible to post all code here, but i am going to share only related code QueryBuilder partyCommQueryBuilder =…
DJhon
  • 1,548
  • 3
  • 22
  • 39
0
votes
1 answer

Exception when generating greenDao with String Primary Key

On compilation of greendao classes, I have an exception: Exception in thread "main" java.lang.RuntimeException: Source properties do not match target properties private static void addMainSchema(Schema schema) { Entity user =…
Oleksandr B
  • 3,400
  • 1
  • 25
  • 28
0
votes
0 answers

A: greendao method loadAll() to Large return

I use loadAll method, my list real on db is 10, but the return list size is too large, around 100 more entityDao = daoSession.getEntityDao(); List listEntities = entityDao.loadAll(); listEntities.Size() = too large
gandalivs
  • 383
  • 3
  • 4
0
votes
1 answer

Update by key in greendao

How to update a table using a key(not primary id key)? I have a customer table and I am getting customer data which are updated or created. So, for newly created data I am using insertOrReplace method which is inserting the data using the…
Anuj
  • 1,160
  • 2
  • 20
  • 40
0
votes
2 answers

Inserting to a to-many relation

If i have for example a table Shows and i have a to-many relation to a table Actors When inserting a Show which doesn't have id(its auto-generated), how can i insert Actors if i don't have id of the show to relate to? Here is DaoGenerator code: …
pedja
  • 3,285
  • 5
  • 36
  • 48
0
votes
2 answers

GreenDAO Exception in CURD operation

I am very new for GreenDAO. I have implement some code in Project provided by GitHub.In github there is default db know as "NOTE" and i am trying to create a new column in it for insert image.This is code to insert data in our launcher activity. …
DJhon
  • 1,548
  • 3
  • 22
  • 39
0
votes
1 answer

How to clean database by GreenDAO

I am very new for GreenDao . I just started one week ago on GreenDao. Now i have one problem , I have one android app that have approx 10MB data base , then i planed to store only last 30 day data in mobile database. Then what happen my content of…
DJhon
  • 1,548
  • 3
  • 22
  • 39
0
votes
1 answer

greenDao: set value for ExpandableListView by using 1 of 2 entities

Now I use 2 entities to get group name and child name to ExpendableListView. I what to use only group entity to get group and child values for ExpendableListView, group entity already have relationship with child entity. How should I get values only…
Sarah0050
  • 135
  • 1
  • 1
  • 9
0
votes
2 answers

greendao: NullPointerException at insert

i have a problem. I am learning Greendao, but on first step i have error.. When I want use insert I get a nullPointerException. I don't know why.. I have autoincrement on id and I don't need put password. I don't know how to work with…
Michal
  • 193
  • 2
  • 3
  • 14
0
votes
1 answer

greenDAO Update and Insert not unique SQLite Error

I'm using greenDAO for an ORM in an Android App that I'm writing. I generated all the DAO files and am now at the point of inserting, updating and deleting in my database. I'm at a particular point where I'm not sure if an Entity will exist in…
chocospaz
  • 739
  • 1
  • 8
  • 15
0
votes
2 answers

How to use Polymorphic in greenDao?

I have already tried use polymorphic in greenDao, but not successful. How to use polymorphic in greenDao ? for example: I have a table "my_favorites", in that i can store id foreign key of Events, Pictures, Music ... ? I hope for your help!
Luan D
  • 1,320
  • 1
  • 13
  • 26
0
votes
2 answers

greenDao imitate join

I have two entities: "Orders" and "WorkPosition". The Workpositions are related through the id of the orders, that means i have an toMany-Relationship here. One order have "n" Workpositions and one Workpostion has always an order_id. So there is a…
oli
  • 569
  • 6
  • 16