1 Reply Latest reply on Oct 23, 2001 11:09 AM by Benjamin Hille

    isIdentical

    Benjamin Hille Newbie

      I am trying to compare two entity beans in JBoss 2.4.3 and have a very strange result:

      If I do the following:

      System.out.println(aCountry.isIdentical(aJurisdiction.getCountry()));

      I got a "false", where the two beans use the same data.

      The following:
      System.out.println(aCountry+ " "+aJurisdiction.getCountry());

      I got:
      ethenticate/Country:com.notuskey.persistence.whoWhere.CountryPK@e0 ethenticate/Country:com.notuskey.persistence.whoWhere.CountryPK@e0

      Which shows that the Pk is indeed refering to the same bean...

      Any ideas ?

      Benjamin

        • 1. Re: isIdentical
          Benjamin Hille Newbie

          This piece of code also display "false"

          com.notuskey.persistence.whoWhere.Jurisdiction aJuris = home.findByID_Country(new Long(224));
          com.notuskey.persistence.whoWhere.Jurisdiction aJuris1 = home.findByID_Country(new Long(224));
          System.out.println(aJuris1.isIdentical(aJuris));

          I am really puzzled !!

          Benjamin