Has_one association for both REST/Peer worked
WIP more activerecord like has_one, has_many for REST and Peer
Fixes query_spec for cardinality many but not ref type
Fixes replacing cardinality many of entity refs
Fixes CRbuy error