luckydexte
Programmer
Hello all,
I am running into a problem that I cannot seem to solve. I have an ArrayList of a object called roads and the iterate function is not working the way it should (or at least the way I think it should). Here is the code:
ArrayList roads = new RoadFunctions().getRoadMatching(roadNumber);
Iterator i = roadCondList.iterator();
while(i.hasNext()) {
RoadCond rc = (RoadCond) i.next();
System.err.println(rc.getSegId_());
}
The output is:
56683
56683
56683
56683
56683
However, there are five different Seg ID's in the table that I am pulling from. The SQL generated is as follows and when I run it from the command line I get the correct result.
select
roadcond0_.ROAD_NO,
roadcond0_.NUM_RATING,
roadcond0_.SEGMENT_ID,
roadcond0_.RESULT_DATE,
roadcond0_.STATUS,
roadcond0_.PROGRAM,
roadcond0_.FY
from
ROADCOND
where
ROAD_NO=6444
Any ideas what I am doing wrong?
Thanks,
Brandon
I am running into a problem that I cannot seem to solve. I have an ArrayList of a object called roads and the iterate function is not working the way it should (or at least the way I think it should). Here is the code:
ArrayList roads = new RoadFunctions().getRoadMatching(roadNumber);
Iterator i = roadCondList.iterator();
while(i.hasNext()) {
RoadCond rc = (RoadCond) i.next();
System.err.println(rc.getSegId_());
}
The output is:
56683
56683
56683
56683
56683
However, there are five different Seg ID's in the table that I am pulling from. The SQL generated is as follows and when I run it from the command line I get the correct result.
select
roadcond0_.ROAD_NO,
roadcond0_.NUM_RATING,
roadcond0_.SEGMENT_ID,
roadcond0_.RESULT_DATE,
roadcond0_.STATUS,
roadcond0_.PROGRAM,
roadcond0_.FY
from
ROADCOND
where
ROAD_NO=6444
Any ideas what I am doing wrong?
Thanks,
Brandon