I have an object "Survey" link to some "Questions" entities (One To Many association). In my controller, I can add some Questions to this Survey. At the end, I would like to do some stuff before any flush.
For example, first I have : Survey1 with QuestionA and QuestionB (through $Survey->getQuestions() )
At the end : Survey1 with QuestionA QuestionB and QuestionC
Problem is :
$Survey->getQuestions()
only gave me QuestionA and QuestionB before I flush. How is it possible for me to get all objects before a flush ? It is very important for me to not flush because I make a lot of tests and I don't want to commit my changes if I am not sure that everything is ok.