Merge custom RelationFieldFactory from pull/7
Update tests