Added the ability to create special primary key on many-to-many
relationships

Fixed a infinite loop on operation list class when calculating the chain
size.