My understanding is that CascadeType.PERSIST alone should allow transient instances to be created but not updated. However, this is not working and I am getting the "save the transient instance before flushing" error.
If I add CascadeType.MERGE, then everything works fine. I don't want CascadeType.MERGE, only CascadeType.PERSIST.
This was my mistake, sorry. I have it fixed and working now.