<br>&nbsp;&nbsp;&nbsp; Adam,<br><br>&nbsp;&nbsp;&nbsp; Yes, you are right. I&#39;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>&nbsp;&nbsp;&nbsp; Mark, are you ok with changing the behavior?<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br>&nbsp;&nbsp;&nbsp; <br><br><div><span class="gmail_quote">2007/10/29, Adam Lewandowski &lt;<a href="mailto:adam@alewando.com">adam@alewando.com</a>&gt;:
</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&#39;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&#39;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>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>