Allows ForeignField references by class or by name.

[Resolves #76]