1 Reply Latest reply on Jul 25, 2003 9:42 AM by cvaughan

    CMR Problem ..... URGENT

    sysuser1

      hi

      I developed a sample CMR and when i try to access child records from parent i get duplicate.

      Say i have SampleCMP ( as parent) and SampleCMPChild as (child)

      I have one to many relationship and in SampleCMP i have a method called getCmpChilds()

      When i execute this method i am returned same data for the number of rows in database. Say SampleCMPChild has 3 rows with data XXX, YYY and ZZZ then i am retuned ZZZ 3 times . Not sure what is going on.

      Attaching the jar file ................................
      please help URGENT ...........

        • 1. Re: CMR Problem ..... URGENT
          cvaughan

          I had a similar problem.

          It turned out to be a problem with my Primary key class used by the child table. I am not sure if you are using A Primary Key class. If you are keep reading

          The Primary key class I used had the foreign key as the primary key so when the equals method in my primary key class was called it did not evaluate correctly and I got duplicates back.

          Just change the primary key in you primary key class to something else. Use any other field as long as it has unique values.

          I hope this helps