Immutable entities added to a session have Status.MANAGED unless loaded by the Session

Description

An immutable entity will only have Status.READ_ONLY if Hibernate loads the entity itself, e.g., Session.get(), Session.load(), s.merge(), Criteria/Query.list(), Criteria/Query.uniqueResult().

Detached and transient entities that are added to a session via Session.persist(), Session.save(), Session.saveOrUpdate() have Status.Managed.

Environment

None

Activity

Show:
Gail Badner
February 24, 2010, 11:20 PM

Fixed in trunk.

Steve Ebersole
March 21, 2011, 7:08 PM

Bulk closing stale resolved issues

Fixed

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure