Yevgeny Zaspitsky has posted comments on this change.

Change subject: core: Introduce NetworkAttachment entity
......................................................................


Patch Set 19:

(1 comment)

https://gerrit.ovirt.org/#/c/32411/19/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/NetworkAttachment.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/NetworkAttachment.java:

Line 107:             return false;
Line 108:         if (getClass() != obj.getClass())
Line 109:             return false;
Line 110:         NetworkAttachment other = (NetworkAttachment) obj;
Line 111:         if (id == null) {
> "with the transition to ORM all we should care of is the real identifiers o
equals/hashCode should refer to business key of the entity. 
Here that's (networkId, nicId and hostId). The id member of the entity should 
not be part of the entity equality as that is generated every time an instance 
of the entity is created.
That's the JPA approach.
Line 112:             if (other.id != null)
Line 113:                 return false;
Line 114:         } else if (!id.equals(other.id))
Line 115:             return false;


-- 
To view, visit https://gerrit.ovirt.org/32411
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ided81dc2be68dc4c7a9d491697f887cdae477a2c
Gerrit-PatchSet: 19
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Mucha <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to