A have a view with a union query as datasource. I didn't bother with the index, but now I created a Data Entity from the view, so I need an index. (As a side question: does the entityKey need to be unique? I assume so.)
Is there some documentation I can read or an example to look at?
My first solution was to save use the tableID and recID. But then those fields are included in the export - my boss got a heart attack.
My current solution is saving the SourceTable as an enum and then I have a Description255 field (lets name it sourceIndex) in which I build the index of the source table as a string. For example one of the query datasources is table PurchLine. So MyView.SourceTable = XYZSourceTable::PurchLine and MyView.sourceIndex = PurchLine.PurchId + int2str(PurchLine.LineNumber). Is this solution acceptable?
It still has issues though. Firstly I have no idea what the performance impact is of a Description255 string as part of index. And then one of the other source tables is BankAccountTrans. BankAccountTrans's only unique index and primary index is AcctTransDate which includes RecId. So the resulting string is not very flattering to say the least.