CLOUDSTACK-1277: populating transit password field to UserVmJoinVO in

converting from UserVm to UserVmJoinVO.
This commit is contained in:
Min Chen 2013-02-14 12:01:40 -08:00
parent 298c5ee06b
commit cf7ac9d6c4

View File

@ -327,7 +327,15 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
}
Set<Long> vmIdSet = userVmDataHash.keySet();
return searchByIds(vmIdSet.toArray(new Long[vmIdSet.size()]));
List<UserVmJoinVO> uvms = searchByIds(vmIdSet.toArray(new Long[vmIdSet.size()]));
// populate transit password field from UserVm
if ( uvms != null ){
for (UserVmJoinVO uvm : uvms){
UserVm v = userVmDataHash.get(uvm.getId());
uvm.setPassword(v.getPassword());
}
}
return uvms;
}
}