Hibernate @Version annotation and object references an unsaved transient instance
问题 My New Project is in Hibernate 4.2.5.Final and Spring. After Login, I am storing the user object in the session. Now after successful login, I need to insert one record in the application log. Here are the classes: Class BaseEntity @MappedSuperclass public abstract class BaseEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long ID; @Version private Long version; private Long createdBy; @Temporal