fix increment logic for writing a new instance to a relation
fix increment logic for writing a new instance to a relation

rfaulkner/databayes,rfaulkner/databayes,rfaulkner/databayes,rfaulkner/databayes,rfaulkner/databayes