### Question:
DescriptorColumnExtractor extends BaseColumnExtractor implements PropertyVisitor { public void extract(String prefix) { this.prefix = prefix; boolean newEntityResult = false; this.labelPrefix = null; TranslatorContext.DescriptorType type = TranslatorContext.DescriptorType.OTHER; if(prefix != null && prefix.startsWith(PREFETCH_PREFIX)) { type = TranslatorContext.DescriptorType.PREFETCH; labelPrefix = prefix.substring(2); if(context.getQuery().needsResultSetMapping()) { entityResult = context.getRootEntityResult(); if (entityResult == null) { throw new CayenneRuntimeException("Can't process prefetch descriptor without root."); } newEntityResult = false; } } else { if(context.getQuery().needsResultSetMapping()) { entityResult = new EntityResult(descriptor.getObjectClass()); newEntityResult = true; } if(descriptor.getEntity().getDbEntity() == context.getRootDbEntity()){ type = TranslatorContext.DescriptorType.ROOT; context.setRootEntityResult(entityResult); } } context.markDescriptorStart(type); descriptor.visitAllProperties(this); DbEntity table = descriptor.getEntity().getDbEntity(); String alias = context.getTableTree().aliasForPath(prefix); for (DbAttribute dba : table.getPrimaryKeys()) { String columnUniqueName = alias + '.' + dba.getName(); if(columnTracker.add(columnUniqueName)) { addDbAttribute(prefix, labelPrefix, dba); addEntityResultField(dba); } } if(newEntityResult) { context.getSqlResult().addEntityResult(entityResult); } context.markDescriptorEnd(type); } DescriptorColumnExtractor(TranslatorContext context, ClassDescriptor descriptor); void extract(String prefix); @Override boolean visitAttribute(AttributeProperty property); @Override boolean visitToOne(ToOneProperty property); @Override boolean visitToMany(ToManyProperty property);  }### Answer:
@Test public void testExtractNoPrefix() { DbEntity mockDbEntity = createMockDbEntity("mock"); TranslatableQueryWrapper wrapper = new MockQueryWrapperBuilder() .withMetaData(new MockQueryMetadataBuilder() .withDbEntity(mockDbEntity) .build()) .build(); TranslatorContext context = new MockTranslatorContext(wrapper); DataMap dataMap = new DataMap(); dataMap.addDbEntity(mockDbEntity); ObjEntity entity = new ObjEntity(); entity.setName("mock"); entity.setDataMap(dataMap); entity.setDbEntity(mockDbEntity); ObjAttribute attribute = new ObjAttribute(); attribute.setName("not_name"); attribute.setDbAttributePath("name"); attribute.setType("java.lang.Integer"); entity.addAttribute(attribute); dataMap.addObjEntity(entity); EntityResolver resolver = new EntityResolver(); resolver.addDataMap(dataMap); resolver.setValueComparisionStrategyFactory(new DefaultValueComparisonStrategyFactory(mock(ValueObjectTypeRegistry.class))); DescriptorColumnExtractor extractor = new DescriptorColumnExtractor(context, resolver.getClassDescriptor("mock")); extractor.extract(); assertEquals(2, context.getResultNodeList().size()); ResultNodeDescriptor descriptor0 = context.getResultNodeList().get(0); ResultNodeDescriptor descriptor1 = context.getResultNodeList().get(1); assertNull(descriptor0.getProperty()); assertNotNull(descriptor0.getNode()); assertThat(descriptor0.getNode(), instanceOf(ColumnNode.class)); assertFalse(descriptor0.isAggregate()); assertTrue(descriptor0.isInDataRow()); assertNotNull(descriptor0.getDbAttribute()); assertEquals("name", descriptor0.getDataRowKey()); assertEquals(Types.VARBINARY, descriptor0.getJdbcType()); assertEquals("java.lang.Integer", descriptor0.getJavaType()); assertNull(descriptor1.getProperty()); assertNotNull(descriptor1.getNode()); assertThat(descriptor1.getNode(), instanceOf(ColumnNode.class)); assertFalse(descriptor1.isAggregate()); assertTrue(descriptor1.isInDataRow()); assertEquals("id", descriptor1.getDataRowKey()); assertNotNull(descriptor1.getDbAttribute()); assertEquals(Types.BIGINT, descriptor1.getJdbcType()); }