constraint and update issue with foreign collections fixed