I have a service that creates and stores a file and returns a FileDescriptor
The screen that requests this service sees the filedescriptor as __new: true and tries to save it again and I get an unique ID violation error
You can use makeDetached() method of the EntityStates bean. But usually it is useful only when you receive an entity from some external source like JSON. If you correctly saved your entity, it must be in the detached state.