Collect data for associations with composite keys

ResolveTargetEntityListener throws an error on binding entities with composite primary keys.
This patch preprocesses associations with composite primary key and changes columns stored and join columns.