Fix setting of foreign key options values with spaces

* Logic moved to setters and then in one method.
* Tests added