Question: I have an entity, that represent order sent by the customer , this order might be updated after some discussion with the customer on phone, but the initial order sent by the customer must be persisted without update. 
how i can persist same entity twice , is it efficient to use deep cloning.
i have tried to detach the the entity in order for persistence context to persist a new one , but still the persistence context is updating the first entry.

Answer: 
You can not persist one object twice in one session, so you need copy your order and save (persist) it again. 
[hibernate copy object values into new object with new generated ID](https://stackoverflow.com/questions/9944882/hibernate-copy-object-values-into-new-object-with-new-generated-id)
That's an interesting question. I think the quickest solution would probably be to use a multi-part ID. The first part would be the original order number and then every change increments the second part of the key. In your code you'd just need to find the object, make sure it's detached, alter the second part of the key and then persist it. As long as it's been detached it should then be saved away as a new order.

This post shows you how to use a [composite key](https://stackoverflow.com/questions/13032948/how-to-create-and-handle-composite-primary-key-in-jpa).