I am using Auto Query on a postgres database with different schemas on Servicestack 6.03 . My Configure.AutoQuery.cs looks like
public void Configure(IWebHostBuilder builder) => builder
.ConfigureAppHost(appHost => {
appHost.Plugins.Add(new AutoQueryFeature {
MaxLimit = 1000,
IncludeTotal = true,
GenerateCrudServices = new GenerateCrudServices
{
//IncludeService = op => !ignoreTables.Any(table => op.ReferencesAny(table)) &&
// !(op.IsCrudWrite()),
//IncludeType = type => !ignoreTables.Contains(type.Name),
////when including app_user and putting app_users in types, get error
//AutoRegister = true,
CreateServices =
{
new CreateCrudServices(),
new CreateCrudServices{Schema = "Environment"},
new CreateCrudServices{Schema = "Governance"},
new CreateCrudServices{Schema = "HealthAndSafety"},
new CreateCrudServices{Schema = "Social"},
new CreateCrudServices{Schema = "TrainingAndDev"},
new CreateCrudServices{Schema = "Transformation"},
new CreateCrudServices{Schema = "Answers"},
new CreateCrudServices{Schema = "Configuration"},
}
}
//IncludeTotal = true,
});
});
I have the same table name under different schemas E.g. Question table. So I have a Governance.Question, Configuration.Question etc.
I am getting the following errors when running my service
Initializing Application envisionapi took 6197.2544ms. 15 error(s) detected: [{"errorCode":"NotSupportedException","message":"Could not resolve type 'ConfigurationConfigurationConfigurationConfigurationConfigurationQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'GovernanceGovernanceGovernanceGovernanceGovernanceQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'HealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'ConfigurationConfigurationConfigurationConfigurationConfigurationQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'GovernanceGovernanceGovernanceGovernanceGovernanceQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'HealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'ConfigurationConfigurationConfigurationConfigurationConfigurationQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'GovernanceGovernanceGovernanceGovernanceGovernanceQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'HealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'ConfigurationConfigurationConfigurationConfigurationConfigurationQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'GovernanceGovernanceGovernanceGovernanceGovernanceQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'HealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'ConfigurationConfigurationConfigurationConfigurationConfigurationQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'GovernanceGovernanceGovernanceGovernanceGovernanceQuestion'","errors":[]},{"errorCode":"NotSupportedException","message":"Could not resolve type 'HealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyHealthAndSafetyQuestion'","errors":[]}]
However, the services still bind and I can use it, although the paths/ naming seems inconsistent.
For e.g. For the Auditors Schema, the services are called QueryAuditorsQuestions, PatchAuditorsQuestion etc, but for Configuration schema, it is just QueryQuestions etc…
Also, the path for QueryQuestions changed from configuration/questions to just questions after upgrading a minor SS version.