Question

Is there a way (meta property maybe) to tell db4o to simply ignore a specific property of a class?

I can't see anywhere to do that..

For my purpose I have a bunch of data entity that i need to persist now and then. I also sometimes need to hold a ref to a UI element associated with it, but I don't want db4o to persist that element when I update the object.

I can go around it by backing up, nulling the ref, saving, and finally restoring the reference but it seems really bad.

Anyway I can tell db4o to ignore it altogether?

Was it helpful?

Solution

You can add the Transient attribute to the specific field (db4o knowns nothing about properties)

public class Test
{
    [Transient] private string name;
    // ...
}

Best

OTHER TIPS

Its actually right there in the doco, you just need the right search term :-)

Look in the docs for Transient Fields / Classes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top