adding an object without saving

Hi



I want to add an object I create to the objectmanager, but without saving. Saving should be done only when I call flush. I have a form that has a cancel button, and when pressed, all changes made in the form should be discarded. In this form users can alter or add objects, but objects that I add, can only be added by objectmanager.save(newobj)



Unfortunatly there is no master object that holds all these child objects (than I could use cascaded saving). Is there a way to add the objects to the objectmanager without directly saving them to underlaying database?

Hello, unfortunately not. You will have to manage the objects yourself, and when it's time to effectively save it in the database, then you call Save.