Add ability to create a new relation (fixes #1576)