Allow to pass class name as option

This is useful for example when an association corresponds to a class which differs from its identifier (e.g. :note_id of referring to class Document)