
Validate Multi-Stem Grouping (Internal)
dot-validate_multi_stem_grouping.RdChecks the multi_tiges_id column, which holds the tag of the
main stem a secondary stem belongs to. It is a staging column: the import
resolves it to data_individuals.stem_grouping, which stores the
parent's id_n. Anything that cannot be resolved becomes a silently
missing grouping after the insert, so it is checked beforehand.
Details
Checks performed, mirroring the Feature Wizard's multi-stem step:
values that are not a tag number (error)
a stem pointing at itself (error)
a parent tag absent from both the import and the plot in the database (error)
a parent that is itself a secondary stem, which would chain the grouping instead of pointing at the main stem (error)
members of a group carrying different
idtax_n(warning)a parent that already carries a grouping in the database (warning)