0

Hi I'm using db4o in an android application. I want to store multiple objects in a database so I have a loop that adds my objects in the db but if I don't put the close() IN the loop (after each store()), all the objects won't persist the next time I open the db. How is this possible? And how can I put only one close() AFTER the loop without having that problem?

I want to do only one close() because this is expensive in IO and it slows down the application initialization on the phone.

Thanks!

Alexis
  • 16,629
  • 17
  • 62
  • 107

1 Answers1

1

First, is this related to DB4O close() wipe the DB? ?

This definitely works :)

Can you provide a sample android project that reproduces the problem? (you can email me directly: adriano db4o dot com)

Best

Community
  • 1
  • 1
Vagaus
  • 4,174
  • 20
  • 31
  • Indeed it's related to my first problem. I found that if I put a close() after each store(), the objects stay in the db. But it slows down the application a lot :( I'll make a little project that reproduce the problem and send it to you probably tonight :) – Alexis Nov 24 '10 at 13:40
  • Jafar, did you managed to create a sample project? Maybe you have sent it to me and it ended up in my spam box. – Vagaus Nov 30 '10 at 13:23