If i want to remove an entity with hibernate i get the message Removing a detached instance.... I understand that's because my transaction/session is closed.
Currently how i do it: If i lookup an object, i open a transaction, do the lookup, commit, close the transaction. The same for the deletion. Whats the right way to do the deletion? Do i need to keep my transaction open all the time (deletion is executed some time later as the lookup). Or do i need a lookup again for the deletion?