Change in ovirt-engine[master]: core : Network object serialization is missing the name fiel...

Moti Asayag has submitted this change and it was merged. Change subject: core : Network object serialization is missing the name field ...................................................................... core : Network object serialization is missing the name field When deleting a Network and using compensation the Network entity is being serialized to JSON using the jackson serializer and persisted into the DB so this change can be rolled back in case of a failure/crash. Using @JsonIgnore annotation on property when using jackson 1.9 and above causes the field/field properties to be ignored by the jackson serializer as mentioned on it's documentation: "Before version 1.9, this annotation worked purely on method-by-method (or field-by-field) basis; annotation on one method or field did not imply ignoring other methods or fields. However, with version 1.9 and above, annotations associated with various accessors (getter, setter, field, constructor parameter) of a logical property are combined; meaning that annotations in one (say, setter) can have effects on all of them (if getter or field has nothing indicating otherwise)." The @JsonIgnore annotation on getName() method causes the network name to not be serialized - so in case of compensation on that entity the executed SQL's doesn't contain the correct name value - which at the moment causes a constraint violation as network table has 'not null' constraint on the 'name' column which means that the whole compensation will roll back and might leave the db in inconsistent state. Change-Id: Ibf08e8b4cd99aa726885ee53f356edc22a6f4324 Signed-off-by: Liron Aravot <laravot@redhat.com> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Network.java 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Moti Asayag: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/9843 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf08e8b4cd99aa726885ee53f356edc22a6f4324 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkolesni@redhat.com> Gerrit-Reviewer: Moti Asayag <masayag@redhat.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com>
participants (1)
-
masayag@redhat.com