Issue #231 finalized tests, database inserting both sides of relation