added deletion handling of array based foreign keys