<br> Adam,<br><br> Yes, you are right. I'm not sure why it uses the identity map instead of assert map, but maybe we should change that or at least providing an alternative method for that. May I ask you please to open a JIRA for it?
<br><br> Mark, are you ok with changing the behavior?<br><br> []s<br> Edson<br> <br><br><div><span class="gmail_quote">2007/10/29, Adam Lewandowski <<a href="mailto:adam@alewando.com">adam@alewando.com</a>>:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If I set my rule base to use equality-based assert behavior, I'm<br>expecting to be able to use the getFactHandle(object) method to retrieve
<br>a previously asserted fact by providing an equivalent (by equals() and<br>hashCode()) object as an argument. This appears to not be the case, as<br>AbstractWorkingMemory uses it's identityMap and associated<br>IdentityAssertMapComparator to do the getFactHandle lookup instead of
<br>the assertMap and EqualityAssertMapComparator. This causes the lookup to<br>be done with the system hashCode() method and not the overridden version<br>supplied in my fact class. The lookup thus fails and returns null.
<br><br>Is there a way to have getFactHandle or some equivalent code do what I<br>want? This is with 4.0.3.<br><br>Thanks,<br>Adam Lewandowski<br>_______________________________________________<br>rules-users mailing list
<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div>
<br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>