Adds initial code to support passing associations when creating new instances (#162)

There are more stuff to do but at least creating new instances should
be more easy for users.