db4o

db4o to preserve identity of objects.

Is there a way to preserve an objest identity in db4o. Suppose I store a BigDecimal in embedded db4o. When I read it twice I get two distict objects with the same value (which is quite obvious). Is there any setting to force db4o to cashe query sersults so that two querries would return reference to the same instance, or do I have to ...

Trouble with db4o...objects aren't returned after an IIS reset/container is out of scope.

So I'm probably doing something tragically wrong with db4o to cause this issue to happen...but every time I reset my context I lose all of my objects. What I mean by this is that as soon as my container object goes out of scope (due to an IIS reset or whatever) I can no longer retrieve any of the objects that I previously persisted. Wi...

Saving images or pdfs in db4o

I know it is not a good thing to save files in a relational databas. But how about in a objectdatabase? Is it still a bad idea or are they more adapted for this kind of operations? ...

db4o querying subobject

I've just started with db4o and I stumbled on to a problem. I have an object with a subobject (it is probably not the correct word but I hope you get what I mean). The subobject contains two dates, one start date and one end date. I would like to show the main object if it has at least one sub object where DateTime.Now is inbetween th...

Querying by type in DB4O

How do you pass a class type into a function in C#? As I am getting into db4o and C# I wrote the following function after reading the tutorials: public static void PrintAllPilots("CLASS HERE", string pathToDb) { IObjectContainer db = Db4oFactory.OpenFile(pathToDb); IObjectSet result = db.QueryByExample(typeof("C...

db4o running in asp.net Medium Trust environment

I am using the embedded client/server version of db4o (I called OpenServer() instead of OpenFile() method) so that I can host an asp.net website that will have several users reading and writing to the database simultaneously. The only issue is that the webhost that we use is a medium trust environment so it's throwing an error stating t...

How to design many-to-many relationships in an object database?

I thought it was about time to have a look at OO databases and decided to use db4o for my next little project - a small library. Consider the following objects: Book, Category. A Book can be in 0-n categories and a Category can be applied to 0-m Books. My first thought is to have a joining object such as BookCatecory but after a bit o...

Opening objects with a renamed namespace/assembly in db4o

I have a set of objects in db4o format in a .dat file. The objects in that file are OldNamespace.MyObject, OldAssemblyName. The problem is I've sinced renamed the namespace and assembly to something more permanent. Short of renaming the assembly and namespace (which is what I'm doing), is there a way of opening the objects into the new ...

Execute a "SELECT TOP n" in DB4O

Does anyone know how how to execute something like a "SELECT TOP n" in DB4O in C# ...

How can I stop ".\null\logs" folder being created?

My Java 6 console app is creating an empty ".\null\logs" folder when I run it. I've tracked this down to being caused by db4o. Why is this being created, and is there any way that I can prevent it from being created? This happens under both Windows XP and Vista, if that's relevant. ...

DB4O with Silverlight RIA Services

Hello, I've considered using the db4o OODBMS with a recent Silverlight / RIA Services project, but there's one point that I could use some advice on - how to make associations work. RIA Services requires that you mark all of your associated entities with an AssociationAttribute. The AssociationAttribute's constructer requires that you...

Improve db4o linq query

Hello, I got a problem with this linq query: from PersistedFileInfo fi in m_Database from PersistedCommit commit in m_Database where commit.FileIDs.Contains( fi.ID ) where fi.Path == <given path> select new Commit( m_Storage, commit ); As you can see, every PersistedCommit contains a Collection<int> called FileIDs which connects it t...

Db4o object update

Hi, I'm using db4o for a simple app, with an embedded db. When I save an object, and then change the object, is it suppose that db4o returns the changed object? Here's the code: [Test] public void NonReferenceTest() { Aim localAim = new Aim("local description", null); dao.Save(localAim); // changing the loca...

Client Server Assembly Missing? Db4Objects 7.4

I have downloaded the current version of Db4Objects (7.4) and installed it. It appears to be missing the Client Server assembly Db4objects.Db4o.CS.dll Does anyone know if Client Server has changed with this version? If it has, does anyone have some details about creating a simple Server? ...

Db4O - Can I save a String?

I have the following code: Assert.IsTrue(Repository.FindAll<string>().Count() == 0); string newString = "New String"; Repository.Save(newString); Assert.IsTrue(Repository.FindAll<string>().Count() == 1); But it is failing. I suppose it has something to do with the fact that I'm saving a string. My Save() code is this: public v...

A few questions about working with db4o

I am trying the db4o object databse and so far I quite like what I am seeing, but I also read this post on stackoverflow http://stackoverflow.com/questions/21207/db4o-experiences/24499#24499 indicating that not everything that seems so easy is easy. Right now, I have some questions regarding on how db4o is used in real world apps. So i...

Is Using Db4o For Web Sites a judicious choice?

Is using Db4o as a backend datastore for a Web site (ASP.NET MVC) a judicious choice as an alternative to MS SQL Server ? ...

Db4o query: find all objects with ID = {anything in array}

I've stored 30,000 SimpleObjects in my database: class SimpleObject { public int Id { get; set; } } I want to run a query on DB4O that finds all SimpleObjects with any of the specified IDs: public IEnumerable<SimpleObject> GetMatches(int[] matchingIds) { // OH NOOOOOOES! This activates all 30,000 SimpleObjects. TOO SLOW! ...

Can you recommend a good resource for configuring db40 on Mono / Open SUSE?

The db40 forums seem to have sparse activity. I am seeking a blog post, article, or your input on how you installed and configured db40 for Mono on the Open SUSE / Ubuntu platform. I am a Linux n00b and anything you can provide would help greatly. ...

Lambda syntax in linq to db4o?

I know the following is possible with linq2db4o from Apple a in db where a.Color.Equals(Colors.Green) select a What I need however is something that allows me to build my query conditionally (like I can in other linq variants) public IEnumerable<Apple> SearchApples (AppleSearchbag bag){ var q = db.Apples; if(bag.Color != null...