UniqueFieldValueConstraint Class

Summary

Configures a field of a class to allow unique values only.
Assembly
Db4objects.Db4o-2010.dll
Namespace
Db4objects.Db4o.Constraints
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IConfigurationItem"] click Interface0 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Config/IConfigurationItem" Type["UniqueFieldValueConstraint"] class Type type-node

Syntax

public class UniqueFieldValueConstraint : IConfigurationItem

Remarks

Configures a field of a class to allow unique values only. In C/S mode, add this configuration-item to the server side only. You need to turn on indexing for the given field, otherwise the unique constrain won't work. Add this to your configuration with Db4objects.Db4o.Config.ICommonConfiguration.Add(Db4objects.Db4o.Config.IConfigurationItem)

Constructors

Name Summary
UniqueFieldValueConstraint(Object, string) constructor to create a UniqueFieldValueConstraint.

Fields

Name Constant Value Summary
_clazz
_fieldName

Methods

Name Value Summary
Apply(IInternalObjectContainer) void
internal method, public for implementation reasons.
Prepare(IConfiguration) void