Fixed problem when adding existing inactive row.
Added relationship constraints.