I wish to have a hint on how to obtain this behaviour:

I' have a companies and each company has more "activity" and "post-activities". I create "activity" by entityreference prepopulate module.
I wish to save "post-activities" for each "activity" of each single company.
Problem is that "activity" (term reference) may be the same for many companies, than i wish to create a "unique" company-activity key. i'm imaging something like this:

(nid 64) Company
(entity_id 64)<->(nid 30) Activity - (Field-to-create-unique id 64-30)
(entity_id 64-30) (nid 1) Post-activities
(entity_id 64-30) (nid 2) Post-activities
and so on...

I don't know if this is a right way or there is a more simple solution.

Could you give me a suggestion on how to get it?

Thx