During the compilation of a custom script with the DBCompiler, the error "CreateSingleDbObject is not a member of Ientity" is raised, but when editing the script in Visual Studio, the CreateSingleDbObject IS available and shows as a member of IEntity. Also, in Visual Studio it can be debugged without issue.
The code causing the issue:
Dim hist_ADSAccount_Object As New VI.DB.History.ColumnHistory(ADSAccount_Object.Entity.CreateSingleDbObject(connection), […]
原因
This is by design. Since Identity Manager version 7.0, the object layer has been completely redesigned.
For example, in older versions, a single object was an ISingleDBObject, but in newer versions, it's an IEntity.
解决办法
To avoid having to recreate all implementations during a migration from an older version to a new version, there is a compatibility method in the SystemLibrary that is included by default.
To use it in a script, it needs to be imported. Add the following at the beginning of the script.:
#If Not SCRIPTDEBUGGER
Imports VI.DB.Compatibility
#End If
After this, it will work both in Identity Manager and also in Visual Studio.