Omer Frenkel has uploaded a new change for review.

Change subject: core: fix serialization error for template
......................................................................

core: fix serialization error for template

when importing template, the object is serialized to the db,
because there are 2 methods to get name, an error is raised.

this patch add ignore to one of the methods to fix this problem.

Change-Id: I43a1777b038c433bc301eee69aee3549f680805f
Signed-off-by: Omer Frenkel <ofren...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/12/11112/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
index 31811bb..c57df7d 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
@@ -15,6 +15,7 @@
 import javax.validation.groups.Default;
 
 import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonProperty;
 import org.hibernate.annotations.Type;
 import org.hibernate.annotations.TypeDef;
 import org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType;
@@ -136,6 +137,7 @@
         this.childCount = value;
     }
 
+    @JsonProperty
     public String getname() {
         return this.name;
     }
@@ -260,6 +262,7 @@
         return getId().hashCode();
     }
 
+    @JsonIgnore
     @Override
     public String getName() {
         return getname();


--
To view, visit http://gerrit.ovirt.org/11112
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43a1777b038c433bc301eee69aee3549f680805f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel <ofren...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to