Search code examples
asp.netdb4o

copying the db4o file doesn't copy the data in it


I have a db4o file with data in it, when i try to copy the file to another project, the data gets empty ? what is the reason behind it ? Can some one explain it to me ?

Thanks in anticipation


Solution

  • db4o keep all the data inside one single file.

    Probably what is happening is that in the new project you have different assembly/namespace names.

    Since db4o relies on these names it fails to find the objects.

    What happens if you query for all objects? (I guess you will get back instance of GenericObject.

    To fix this you should either have a common assembly with your object model or use db4o aliases.