-
Notifications
You must be signed in to change notification settings - Fork 18
An important note on storage
One of the most important features of the playOrm library is flush which gives you a better chance of not corrupting your data in your nosql store. You will notice you can call EntityManager.put, put, put but it never writes to cassandra until you call flush. Also, as you call the put method, it is also queuing up index changes if needed as well. Once you call flush, it is all pushed to the nosql store.
All types are stored as their smallest type. A long of value 56 will be stored as only one byte. In fact any number of any integer type between -128 and 127 is stored as one byte. Same with decimal numbers. All are stored at their smallest value saving you lots of space. Column names still tend to take up a bit of space of course.
Use the static methods on StandardConverters.java to convert to byte[] format if you need to if you start using any of the raw apis.