newToDto use all instead of sequence
fixed possible bug in delete when having a join relation