BUG: FTS Critical bug - cannot create `cdn_organization`
cdn_organization
has the following FTS config in meta file:
"fts": {
"scope": "Connection",
"connectionName": "ftsSubjectSearch",
"dataProvider": "Mixin",
"indexedAttributes": [
"name",
"orgBusinessTypeID.name",
"orgOwnershipTypeID.name",
"corrIndexID.name",
"corrIndexID.code"
]
}
Cannot save an instance of the entity:
20180823 19411562 " + ubMixinClasses.TubFTSMixin(00196F70).MixinMethod
20180823 19411562 " debug cdn_organization.afterinsert(TubFTSMixin)
20180823 19411562 " + ubMixinClasses.TubDataHistoryMixin(00196A30).MixinMethod
20180823 19411562 " debug cdn_organization.select(TubDataHistoryMixin)
20180823 19411562 " - 00.000.284
20180823 19411562 " + ubMixinClasses.TubStorageMixin(00196970).MixinMethod
20180823 19411562 " debug cdn_organization.select(TubStorageMixin)
20180823 19411562 " + ubApp.TubDataStore(21B7A410).Init
20180823 19411562 " + ubApp.TubApp(00170BE0).DBExecute
20180823 19411562 " + ubApp.TubApp(00170BE0).TubApp.InternalDBExecute
20180823 19411562 " DB ubDBClasses.TubOleDBStatement(10A82740) Prepare 36us SELECT A01.name,A02.name AS name2,A03.name AS name3,A04.name AS name4, A04.code FROM cdn_organization A01 LEFT JOIN cdn_orgbusinesstype A02 ON A02.ID=A01.orgBusinessTypeID LEFT JOIN cdn_orgownershiptype A03 ON A03.ID=A01.orgOwnershipTypeID LEFT JOIN cdn_corrindex A04 ON A04.ID=A01.corrIndexID LEFT JOIN cdn_corrindex A04 ON A04.ID=A01.corrIndexID WHERE A01.ID=? AND A01.mi_deleteDate=?
20180823 19411562 " debug P1: Int64 3000000063301
20180823 19411562 " debug P2: DateTime 9999-12-31T00:00:00
20180823 19411600 " ERROR "EOleDBException(20E148C0)":{"EOleDBException(20E148C0)":{"Message":"TubOleDBConnection: OLEDB Error 80040E14 - (line 1): The correlation name 'A04' is specified multiple times in a FROM clause.\r\n"}}
20180823 19411600 " EXC EOleDBException {"Message":"TubOleDBConnection: OLEDB Error 80040E14 - (line 1): The correlation name 'A04' is specified multiple times in a FROM clause.\r\n"} at 000000010020471E
20180823 19411600 " EXC EOleDBException {"Message":"TubOleDBConnection: OLEDB Error 80040E14 - (line 1): The correlation name 'A04' is specified multiple times in a FROM clause.\r\n"} at 000000010020471E
20180823 19411600 " ERROR "EOleDBException(20E148C0)":{"EOleDBException(20E148C0)":{"Message":"TubOleDBConnection: OLEDB Error 80040E14 - (line 1): The correlation name 'A04' is specified multiple times in a FROM clause.\r\n"}}
20180823 19411600 " EXC EOleDBException {"Message":"TubOleDBConnection: OLEDB Error 80040E14 - (line 1): The correlation name 'A04' is specified multiple times in a FROM clause.\r\n"} at 000000010020471E
20180823 19411600 " EXC EOleDBException {"Message":"TubOleDBConnection: OLEDB Error 80040E14 - (line 1): The correlation name 'A04' is specified multiple times in a FROM clause.\r\n"} at 000000010020471E
20180823 19411600 " DB ubDBClasses.TubOleDBStatement(10A82740) Rows = {"TubOleDBStatement(10A82740)":{"SQL":"SELECT A01.name,A02.name AS name2,A03.name AS name3,A04.name AS name4,\r\nA04.code FROM cdn_organization A01 LEFT JOIN cdn_orgbusinesstype A02 ON A02.ID=A01.orgBusinessTypeID LEFT JOIN cdn_orgownershiptype A03 ON A03.ID=A01.orgOwnershipTypeID LEFT JOIN cdn_corrindex A04 ON A04.ID=A01.corrIndexID LEFT JOIN cdn_corrindex A04 ON A04.ID=A01.corrIndexID WHERE A01.ID=? AND A01.mi_deleteDate=?","SQLWithInlinedParams":"SELECT A01.name,A02.name AS name2,A03.name AS name3,A04.name AS name4,\r\nA04.code FROM cdn_organization A01 LEFT JOIN cdn_orgbusinesstype A02 ON A02.ID=A01.orgBusinessTypeID LEFT JOIN cdn_orgownershiptype A03 ON A03.ID=A01.orgOwnershipTypeID LEFT JOIN cdn_corrindex A04 ON A04.ID=A01.corrIndexID LEFT JOIN cdn_corrindex A04 ON A04.ID=A01.corrIndexID WHERE A01.ID=? AND A01.mi_deleteDate=?","Connection":{"TubOleDBConnection(0A8F56F0)":{"Connected":true,"ServerTimestampAtConnection":"2018-08-23T19:39:36","TotalConnectionCount":1,"TransactionCount":1,"InTransaction":true,"RollbackOnDisconnect":true,"LastErrorMessage":"TubOleDBConnection: OLEDB Error 80040E14 - (line 1): The correlation name 'A04' is specified multiple times in a FROM clause.\r\n","Properties":{"TubOleDBMSSQL2012ConnectionProperties(00170E00)":{"ProviderName":"SQLNCLI11","Engine":"ubOleDBMSSQL2012","ServerName":"(localdb)\\ub","DatabaseNameSafe":"nectain","UserID":"nectain_app","DBMS":"MSSQL","DBMSEngineName":"MSSQL","BatchSendingAbilities":["Create"],"BatchMaxSentAtOnce":4096,"LoggedSQLMaxSize":-1,"ForcedSchemaName":"dbo","RollbackOnDisconnect":true,"StoreVoidStringAsNull":true}}}},"StripSemicolon":true}}
20180823 19411600 " - 00.009.257
20180823 19411600 " - 00.009.528
20180823 19411600 " - 00.009.842
20180823 19411600 " - 00.010.693
20180823 19411600 " - 00.011.750
20180823 19411600 " + ubDBClasses.TubOleDBConnection(0A8F56F0).Rollback
20180823 19411600 " - 00.000.561
Experiments shows that after removal of "corrIndexID.name" and "corrIndexID.code" from "indexedAttributes" it works just fine.