EntityResultConfig entityResult = entityResults.get(oldEntityResult);
String className = entityResult.getEntityClass();
EntityType entityType = _aConn.getPersistenceUnit().getEntityType(className);
if (entityType == null)
throw new IllegalStateException(L.l("Unable to locate entity '{0}' for native query.", className));
int oldIndex = _currIndex;
// jpa/0y15 _currIndex++;
/* jpa/0y14
EntityItem item = entityType.getHome().findItem(_aConn, rs, oldIndex);
if (item == null)
return null;
Entity entity = item.getEntity();
*/
int keyLength = entityType.getId().getKeyCount();
ArrayList<FieldResultConfig> fieldResults
= entityResult.getFieldResults();
Entity entity = null;
int consumed = 0;
try {
// jpa/0y14
entity = (Entity) _aConn.load(className, rs.getObject(oldIndex));
ArrayList<String> columnNameList = new ArrayList<String>();
entityType.generateNativeColumnNames(columnNameList);
String []columnNames = new String[columnNameList.size()];
columnNameList.toArray(columnNames);
entity.__caucho_load_native(rs, columnNames);
// jpa/0y10