equals is generated incorrectly
-------------------------------

         Key: HIB-151
         URL: http://jira.andromda.org/browse/HIB-151
     Project: Hibernate Cartridge
        Type: Bug
    Versions: 3.1, 3.2-RC1    
    Reporter: Petr Ferschmann
 Assigned to: Carlos Cuenca 
    Priority: Minor


Generated equals() compares <<Identifier>> field with itself (ie forgotten 
that).

This is patch (against HEAD in CVS):

Index: cartridges/andromda-hibernate/src/templates/hibernate/hibernate.java.vm
===================================================================
RCS file: 
/cvsroot/andromda/cartridges/andromda-hibernate/src/templates/hibernate/hibernate.java.vm,v
retrieving revision 1.2
diff -r1.2 hibernate.java.vm
34c34
<         if (this.$attribute.name == null || that.${attribute.getterName}() == 
null || !this.${attribute.name}.equals(${attribute.getterName}()))
---
>         if (this.$attribute.name == null || that.${attribute.getterName}() == 
> null || !this.${attribute.name}.equals(that.${attribute.getterName}()))




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Reply via email to