I have a program disk which has a (has a ) relationship with segment. I need to write all the segments stored in the disk to a file, but I'm able to write only the first element in segment instead...