-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linq2Db not all stored procedures scaffolding #4447
Comments
Provided database trigger issue with LINQPad driver we need to fix - procedures scaffold result in NRE exception. Regarding original issue: many procedures in database failed to load it's schema. E.g. for
This is not a blocking issue for procedure, but because Firebird procedure could be used as Table function we mark them as Table function. And for table function lack of schema results in function skipping as we cannot define function mapping without known result schema. How it could be workarounded:
What we should fix on our side:
|
@Nevega you can see all errors using code like that: var schema = db.DataProvider.GetSchemaProvider().GetSchema(db, new GetSchemaOptions()
{
GetProcedures = true,
});
foreach (var proc in schema.Procedures)
{
if (proc.ResultException != null)
{
Console.WriteLine($"Procedure: {proc.ProcedureName} : {proc.ResultException.Message}");
}
} |
As for interceptor approach workaround you need to look at those methods https://linq2db.github.io/articles/CLI.html#schema-load-interceptors, but I'm not sure it is not too late to fix it there |
Discussed in #4442
Originally posted by Nevega March 6, 2024
I've tried to scaffold an existing database using cli
dotnet linq2db scaffold -p Firebird -c "Server=;Database=;User Id=;Password=" --objects table,stored-procedure,aggregate-function --overwrite true
In result some stored procedures scaffold, but some do not. As I understand no scaffolding procedures which have out parameters.
The text was updated successfully, but these errors were encountered: