allow relations to be passed to the factory
Merge branch 'master' into ubuntu-12.04.precise