Skip Headers

# Exceptions During Conforming

Previous

Next

You can conform query results in a unit of work across one-to-many relationships and a combination of both one-to-one and one-to-many relationships. Example: Querying Across Two Levels of Relationship illustrates a query across two levels of relationships, one-to-many and one-to-one.

Querying Across Two Levels of Relationship

    Expression exp =
      bldr.anyOf("managedEmployees").get("address").get("city").equal("Perth");

By default, any exceptions thrown during conforming are suppressed. However, you can use the `UnitOfWork` method `setShouldThrowConformExceptions` to make the unit of work throw all conforming exceptions. This method takes one `int` argument with the following values:

- 0–do not throw conform exceptions (default)

- 1–throw all conform exceptions

For more information on customizing exception handling when using conforming and in-memory queries, see "Handling Exceptions Resulting From In-Memory Queries".