IConstraint.

Identity() Method

Summary

Sets the evaluation mode to identity comparison.
Assembly
Db4objects.Db4o-2010.dll
Namespace
Db4objects.Db4o.Query
Containing Type
IConstraint

Syntax

IConstraint Identity()

Remarks

Sets the evaluation mode to identity comparison. In this case only objects having the same database identity will be included in the result set. For example:
var pilot = new Pilot("Test Pilot1", 100);
var car = new Car("Ferrari", pilot);
container.Store(car);
var otherCar = new Car("Ferrari", pilot);
container.Store(otherCar);
Query query = container.Query();
query.Constrain(typeof(Car));
// All cars having pilot with the same database identity
// will be retrieved.
query.Descend("pilot").Constrain(pilot).Identity();

Return Value

Type Description
IConstraint this constrain to allow the chaining of method calls.