You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Handle 'subtable' case (the 'cols' entry has 'cols' of its own)
494
513
if table.columns[i].subtable.is_some(){
495
514
tables.push(table);
@@ -565,7 +584,7 @@ fn main() {
565
584
}
566
585
for i in0..table.columns.len(){
567
586
if path == table.columns[i].path{
568
-
if table.columns[i].attr.is_some(){break;}
587
+
if table.columns[i].attr.is_some()|| table.columns[i].serial.is_some(){break;}
569
588
if !table.columns[i].value.borrow().is_empty(){
570
589
if !allow_iteration(&table.columns[i],&settings){break;}
571
590
}
@@ -610,7 +629,9 @@ fn main() {
610
629
else{
611
630
612
631
if !tables.is_empty(){// This is a subtable; write the first column value of the parent table as the first column of the subtable (for use as a foreign key)
let key = tables.last().unwrap().columns[0].value.borrow();
633
+
if key.is_empty() && !settings.hush_warning{println!("Warning: subtable {} has no foreign key for parent (you may need to add a 'seri' column)", table.name);}
634
+
table.write(&key);
614
635
ifletSome(domain) = table.domain.as_ref(){
615
636
letmut domain = domain.borrow_mut();
616
637
let found = match domain.map.get(&table.columns[0].value.borrow().to_string()){
0 commit comments