I am trying to migrate my old db written in sqlite to greendao ORM , I need to set the column to DECIMAL(10,2) for storing the price of the item. What is the equivalent data type that I can use. DO I need to use a custom data type for that?
What is the best data type to use in greendao for Decimal(10,2)
107 Views Asked by Prens At
1
There are 1 best solutions below
Related Questions in GREENDAO
- Green Dao bi-directional One To One mapping
- GreenDao & Triggers strange behaviour
- How to edit the existing SQL table column values using GreenDao?
- Android SQLite can a tables name be 'TABLE'
- Android - GreenDao create/use entity and Dao class for existing sqlite database. Use greenDao with existing db
- Need a join query in greendao
- Volley library and AsyncTask
- Poor performance of greenDAO @toMany relation
- Greendao 3 generate contentprovider
- GreenDAO (Android) - Persist object in multiple tables using one insert
- Could not find method greendao() for arguments on project
- Android getActivity, getContext, getView in fragment is undefined
- How to search on multiple columns at same time using GreenDao?
- accessing db using greendao across application
- Is it correct way to open and close GreenDao 3 connection?
Related Questions in OBJECTBOX
- ObjectBox error during generating classes
- ObjectBox - Database Backup/Restore
- ObjectBox doesn't generate getters and constructors within entities
- every time i have reference to MyObjectBox or Entiry_ class build fails
- Inheritance in entities, using objectbox
- exclude vars from objectbox of specified class
- Create Unique Index in Objectbox
- org.kodein.di.Kodein$NotFoundException: No binding found for bind<LLApi>() with ?<LoginFragment>().? { ? }
- Objectbox fetching from db is showing out of date information
- Android + ObjectBox Search Query Issue
- How to Join in ObjectBox C++
- Sourcery.app artifact instead of Runner.app created during iOS build
- Prove to compiler that object conforms to protocols after verifying conformance
- java.lang.IllegalStateException - Updated schema has 2 entity types, but incoming schema has 2
- Object Box is unable to import dependencies properly in the latest version of Android projects
Related Questions in GREENDAO3
- Could not find method greendao() for arguments on project
- How to make many-to-many relation query in GreenDAO with source property other than primary key?
- Android 25 and Espresso 2.2.2 fails instrumentation test annotations failure
- how do I get the DaoSession in a project library?
- How we can reslove Greendao DB close error?
- What is the best data type to use in greendao for Decimal(10,2)
- greenDAO update and updateInTx not working
- App crash in release build for enabling proguard when using GreenDao
- Is it better to save bitmaps to Sqlite Databse or Files handling its paths in Database ? - Android
- Android Unable to encrypt database using sqlcipher using greendao
- Working with Many to Many and GreenDao 3.1.0 - Android
- Using more than 1 Database in Greendao with 2 different Schemas - Android
- How to implement relationships in Greendao?
- How to use bi-directional Many To Many relationship with GreenDAO?
- Seed GreenDao database on Android
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are a couple of options, use a long value representing the smaller unit.
Then if you had a
long priceproperty, you could get the big unit usingprice / 100and the small unit viaprice % 100. Like this you can still usepricefor regular integer calculation.For formatting, don't forget an extra '0' for the small unit if it is single digit.