Any persistent object returned by get(), load(), or any entity queried is already associated with the current session and persistence context. It can be modified and its state is synchronized with the database.
First, you retrieve the object from the database with the given identifier. You modify the object, and these modifications are propagated to the database during flush when tx.commit() ( we say a flush occurs, Hibernate will obtains a JDBC connection and isssues a single SQL statement) is called.
First, you retrieve the object from the database with the given identifier. You modify the object, and these modifications are propagated to the database during flush when tx.commit() ( we say a flush occurs, Hibernate will obtains a JDBC connection and isssues a single SQL statement) is called.
Comments
Post a Comment