fixed prevention of database access in association handling
fixes spec, another spec added
declare <field>_type field in case of polymorphic associations