Hi,
I have an issue I'm trying to track down and won't to rule out the data being an issue. Running 5.5 Expert
I have a Fact; let's say "Person"
Class Person {
private String fName;
private String lName;
private String ssn;
getters/setters
@Override
public boolean equals(final Object obj) {
if ( obj == null ) return false;
if(obj instanceof Person){
final Person other = (Person) obj;
return Objects.equal(ssn, other.ssn);
} else{
return false;
}
}
@Override
public int hashCode(){
return Objects.hashCode(ssn);
}
}
Now if I insert 2 person objects with the same ssn. Actually if my LHS is $list : ArrayList() collect( Person() ), do I expect 2, 1, or 0 for my arraylist.
What is seeing is that the arraylist is 0 but that doesn't make sense to me and I think there is another underline issue.