Skip to content

Commit ea717ee

Browse files
authored
Fix Unique Identifier columns inside props (#178)
1 parent 4ff8fcf commit ea717ee

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

cdb/Module.hx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,27 @@ class Module {
111111
}
112112
if( psheet == null )
113113
return s.lines;
114+
115+
var pcol = null;
116+
for( c in psheet.columns ) {
117+
if( c.name == col ) {
118+
pcol = c;
119+
break;
120+
}
121+
}
122+
114123
var out = [];
115124
for( o in getSheetLines(sheets,psheet) ) {
116-
var objs : Array<Dynamic> = Reflect.field(o, col);
117-
if( objs != null )
118-
for( o in objs )
119-
out.push(o);
125+
if (pcol != null && pcol.type == TProperties) {
126+
var obj = Reflect.field(o, col);
127+
if( obj != null )
128+
out.push(obj);
129+
} else {
130+
var objs : Array<Dynamic> = Reflect.field(o, col);
131+
if( objs != null )
132+
for( o in objs )
133+
out.push(o);
134+
}
120135
}
121136
return out;
122137
}

0 commit comments

Comments
 (0)