}
newDescriptor.setAlias("");
// This is the default, set it in case no existence-checking is set.
newDescriptor.getQueryManager().checkDatabaseForDoesExist();
if (oldDesriptor.isAggregateDescriptor()) {
newDescriptor.descriptorIsAggregate();
}
descriptor.setDescriptor(newDescriptor);
// Also need to switch the descriptor in the project.
descriptor.getProject().getProject().getOrderedDescriptors().remove(oldDesriptor);
descriptor.getProject().getProject().getOrderedDescriptors().add(newDescriptor);