We have 2 tables EMPLOYEE and TIME_ENTRIES with the latter storing multiple timesheet entries for each employee entry.
The relation is defined in ejb-jar as follows:
The weblogic-cmp-rdbms-jar file has the following entry:
Now we do a simple iteration on the returned collection as follows:
public Collection getAllTimeSheets()
Collection tscoll = getTimeSheets();
Iterator i = tscoll.iterator();
p.println("data $$" + t.getHours());
Collection tsCopy = new ArrayList(tscoll);
The getTimeSheets returns the correct number of records , but they are all repetitions of the first record.What is wrong?
can you please paste the SQl here and use set in place of collection so that the duplicate records will not come. Well changing it to set won;t solve the problem but the SQl query can put more light on it .
Since i have defined the 2 ejbs through a CMR realtionship;my idea was that i need not put any additional QL for that.
The relationship as defined in ejb-jar has alreayd been posted in the original post