Repository 1.0 Usage
If the repository database was created using the Microsoft® Repository version 1.0 engine and has been used for information model creation, population, and retrieval only through this engine, there will be some differences when you run the same application with the Repository version 2.0 engine. The differences arise from the treatment of relationships, as listed below:
- In Repository 1.0, if an application inserts a name-unique relationship with an existing name, the name-uniqueness violation is caught immediately. In Repository 2.0, the violation is caught immediately only if the existing relationship is in the cache (for example, created as part of the same transaction or retrieved into the cache already). Otherwise, the name-uniqueness validation occurs at commit time.
- Enumerators in the Repository 1.0 engine, except those for relationship collections, have static contents, so added items do not appear until a new enumerator is requested from the collection. In the Repository 2.0 engine, enumerators are dynamic, so added items appear immediately in the enumerator.
- In Repository 1.0, if the insertion position in IRelationshipCol::Insert() is larger than the current count of the collection, the call is treated as IRelationshipCol::Add(). In Repository 2.0, if the specified insertion position is one greater than the current count, then the call reduces to IRelationshipCol::Add(). For higher insertion positions, the call returns an error since the user presumably made a mistake (it would be bad programming in any case).
- Invoking IRelationshipCol::Insert() on a nonsequenced or destination collection results in an error in Repository 2.0. In Repository 1.0, the call performs IRelationshipCol::Add() on the origin if the collection is sequenced.
(c) 1988-1998 Microsoft Corporation. All Rights Reserved.