Closed longtaoge closed 8 years ago
Unfortunately your image doesn't work so I'm not sure what your error is. By default, your data is Serialized using Gson. You will need to make sure your objects are serializable via that library. Alternatively you may create your own Serializer and Deserializer by implementing DataSerializer and DataDeserializer.
NoSQL.with(context)
.withSerializer(serializer)
.withDeserializer(deserializer)
.using(SampleBean2.class)
.save(entity);
the Serialized is ok and i am use the Gson also , my mean is if a entity contains a long list ,like SampleBean2 ' entity ,the entity will save as a long json String in DB ,eg : if the list 's size is big than 1000, sqlite will save the String failure.
Ok. I'll work on changing the DB to store a byte array which would be better.
On Sun, Jan 17, 2016, 2:45 AM longtaoger notifications@github.com wrote:
the Serialized is ok and i am use the Gson also , my mean is if a entity contains a long list ,like SampleBean2 ' entity ,the entity will save as a long json String in db ,eg : if the list 's size is big than 1000, sqlite will save the String failure.
— Reply to this email directly or view it on GitHub https://github.com/Jearil/SimpleNoSQL/issues/28#issuecomment-172311634.
that may be good idea , i tested the hawk can saved more data on once I/O
Saving as a byte[] is now in the github. You can build your own copy of the library and try that until I publish a new build to sonatype.
I want save a list in entify like HashMap
public void testSaveEntities2() throws Throwable {
but the result like this
link
How to Support List like HashMap?