title: How to compare java object in jess
body: <p>I have a problem when I compare java object as attribute inside the java class </p>
  
  <p>This is my clp file </p>
  
  <pre><code>(import Model.*)
  
  (deftemplate PizzaBase    
      (declare (from-class PizzaBase)  
               (include-variables TRUE)))  
  
  (deftemplate PizzaTopping   
      (declare (from-class PizzaTopping)  
               (include-variables TRUE)))  
  
  (deftemplate Pizza   
      (declare (from-class Pizza)  
               (include-variables TRUE)))  
  
  (defrule make-pizza
          ?pizzaBase1 &lt;-(PizzaBase{size == 9})
          (Pizza(pizzaBase ?pizzaBase1))  
          =&gt;  
           (add (new PizzaBase "New DeepPan" 10))  
           )  
  </code></pre>
  
  <p>According from my rule, I want to create a new pizzaBase.When the pizzaBase object in Pizza equal pizzaBase1(size = 9), but JESS is not create a new fact for me.
  From my thinking, I think JESS cannot compare the Java object that create from the class.Therefore, There isn't add any fact to JESS.</p>
  
  <p>So,"How to solve this problem?",because I look on the manual on the JESS website but there aren't any title that according my problem.</p>
  
  <p>Thank!</p>