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

GreenDao, how delete relationship entity

I have EntityA and EntityB. EntityA has a to-many relationship with EntityB. I have several EntityB objects that have been set as related (children) to EntityA. How can I delete that relationship without deleting any of the Entity objects?
Wise Shepherd
  • 2,228
  • 4
  • 31
  • 43
0
votes
1 answer

inserting a value of type float into table with greendao

the property is defined with "addFloatProperty" in the model generator. When i store a float for example "5.23" the database show me afterwards "5.23000001907349". I would expect that 5.23 is stored. By inserting it manually everything is fine. How…
drindt
  • 901
  • 10
  • 15
0
votes
1 answer

Extending entities

we'd like to put a layer between GreenDao and the app, so we can keep these layer classes fixed and re-generate GreenDao when needed. Also, we would like to extend these classes with new methods and properties. I came to know there's the "keep…
0
votes
1 answer

greenDao queryBuilder with relational object condition

I have relationship many to many with one entity on the middle. This is my model declaration: //### Family Entity family = schema.addEntity("Family"); Property familyId = family.addIdProperty().getProperty(); …
fabrizotus
  • 2,958
  • 2
  • 21
  • 27
0
votes
1 answer

How to develop a simple database app in android?

I am not an android developer, I prefer C# but, I want to play with Android a bit since I have an android device, I apologize in advance for it. I want to develop a simple app in android with the basic CRUD functions (create, read, update and…
Iakovl
  • 1,013
  • 2
  • 13
  • 20
0
votes
3 answers

catch error when user is trying to insert duplicated value in database - greenDAO

im using greenDAO to generate my DAO classes, everything works fine till i try to insert duplicated values for primary key. It fails when i try to insert duplicated primery key (as expected), but i would like to send the exception to the user and…
Bugdr0id
  • 2,962
  • 6
  • 35
  • 59
0
votes
1 answer

GreenDAO generated entities / name package convention

I'm currently into evaluating GreenDAO for my application. I'm facing the following problem. My app consists of several modules (seperated in packages, e.g. "com.example.app.results", "com.example.app.synchronization"). Some of them have no…
Briareos386
  • 1,927
  • 18
  • 34
0
votes
1 answer

QueryBuilder still returning Entity after delete

I have a listview with an adapter with a list of entities loaded using QueryBuilder.list(). When a delete a entites from this list ( mylist.remove(entiy) and then mydao.delete(entity)) and performing an new request using QueryBuilder.list() my…
adrien le roy
  • 823
  • 2
  • 7
  • 12
0
votes
1 answer

SQLite Howto delete entries from sqlite_sequence?

i use GreenDao and create entries for a Category, which perfectly works. My problem is, when i repeat the action, it comes a failure with de.greenrobot.dao.DaoException: Entity is detached from DAO context. I looked in the database with SQLite…
Logi24
  • 528
  • 6
  • 17
0
votes
1 answer

greenDAO and data validation

I'm looking into using greenDAO for my Android app, but I noticed it doesn't seem to support any kind of data validation other than "not null", "unique", and foreign keys, either on the SQL level (constraints defined when creating tables) or the…
ecraig12345
  • 2,328
  • 1
  • 19
  • 26
0
votes
2 answers

How to add Date property to not be timestamp

So, i'm using greendDao library and i want to store in SQL a date, but always is a timestamp date. I do not want that! Is possible to change that configuration?
Emerick
  • 309
  • 1
  • 10
0
votes
3 answers

GreenDAO really simple query

I want to create a very simple query to look up a sqlite db using greendao. 2 fields, one is the ID and the other 'affirmation'. i am sorry to be such a beginner, but i am not sure how to use greendao including what to import etc.. All i have been…
sunirmalya
  • 67
  • 2
  • 9
0
votes
1 answer

Android Greendao, Database does not open

I try to get an Json object via Spring4Android, that works so far. But I also want it to add this object to the sqlite database on the android device. I want to make this with greendao, it seems as like as my sql query is valid as well (looked in…
Marco
  • 160
  • 2
  • 10
0
votes
2 answers

Green Dao, ContentProvider generation

how to use this template GreenDao generator to generate ContentProvider class: https://github.com/greenrobot/greenDAO/blob/master/DaoGenerator/src-template/content-provider.ftl And what it means this parameters: public static final String BASE_PATH…
Kozlov V
  • 146
  • 5
  • 17
0
votes
1 answer

greenDAO : NullPointerException at insert

I'm using greenDAO for a Android project, I have to say I'm really happy with it. Sadly, I'm currently having quite a strange problem : a NullPointerException while doing an insert, using the LocationCoordsDao, of a newly created LocationCoords…
cid
  • 696
  • 1
  • 8
  • 19