diff --git a/core/src/com/cloud/storage/SnapshotVO.java b/core/src/com/cloud/storage/SnapshotVO.java index 0aa489be7c4..68336cb97ec 100644 --- a/core/src/com/cloud/storage/SnapshotVO.java +++ b/core/src/com/cloud/storage/SnapshotVO.java @@ -31,7 +31,7 @@ public class SnapshotVO implements Snapshot { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") - private final long id = -1; + private long id; @Column(name="data_center_id") long dataCenterId; @@ -248,7 +248,7 @@ public class SnapshotVO implements Snapshot { return state; } - public void setStatus(State state) { + public void setState(State state) { this.state = state; } diff --git a/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java b/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java index 17bcf9b1bcf..a8a07dcc3a6 100644 --- a/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java +++ b/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java @@ -328,7 +328,7 @@ public class SnapshotDaoImpl extends GenericDaoBase implements Transaction txn = Transaction.currentTxn(); txn.start(); SnapshotVO snapshotVO = (SnapshotVO)snapshot; - snapshotVO.setStatus(nextState); + snapshotVO.setState(nextState); super.update(snapshotVO.getId(), snapshotVO); txn.commit(); return true;