Handle same element occurring twice in a node, add warning
This commit is contained in:
@@ -226,9 +226,13 @@ Namespace Documents
|
|||||||
Logger.Debug("Creating fields from [{0}] columns for Table [{1}]", oTable.Columns.Count, oTable.Name)
|
Logger.Debug("Creating fields from [{0}] columns for Table [{1}]", oTable.Columns.Count, oTable.Name)
|
||||||
|
|
||||||
For Each oColumn In oTable.Columns
|
For Each oColumn In oTable.Columns
|
||||||
Dim oSubElement = oSubElements.
|
Dim oQuery = oSubElements.Where(Function(e) e.Name = oColumn.Name)
|
||||||
Where(Function(e) e.Name = oColumn.Name).
|
Dim oElementCount = oQuery.Count()
|
||||||
SingleOrDefault()
|
Dim oSubElement = oQuery.FirstOrDefault()
|
||||||
|
|
||||||
|
If oElementCount > 1 Then
|
||||||
|
Logger.Warn("Found [{0}] elements for column [{1}]. Using first occurrence.")
|
||||||
|
End If
|
||||||
|
|
||||||
If oSubElement IsNot Nothing Then
|
If oSubElement IsNot Nothing Then
|
||||||
Dim oRequired = oColumn.IsRequired
|
Dim oRequired = oColumn.IsRequired
|
||||||
|
|||||||
Reference in New Issue
Block a user