Support creating associated objects using a lambda.