Transient Fields In .NET
This topic applies to .NET version only
There are different ways to prevent fields persistence in .NET:
- You can use the [com.db4o.Transient] attribute to indicate that a field is not part of the persistent state of an object.
- You can use any built-in .NET attribute (NonSerialized for example) or
define your own attribute class and mark it transient for db4o:
Both methods will give you equal results:
Let's now check the results: