Skip to content
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

Support stored procedures without a table mapping #28703

Open
roji opened this issue Aug 13, 2022 · 1 comment
Open

Support stored procedures without a table mapping #28703

roji opened this issue Aug 13, 2022 · 1 comment
Assignees
Milestone

Comments

@roji
Copy link
Member

roji commented Aug 13, 2022

Stored procedure mapping (#28553) currently requires that a table mapping be defined; the table mapping is necessary in order for us to properly perform topological sort (e.g. know about dependencies between tables). It makes sense for users to use views/functions for querying and only sprocs for updating, in which case a table mapping isn't strictly speaking necessary.

See conversation in #28553 (comment)

@PolkageistHS
Copy link

In the meantime, can the exception message be updated to reflect that non-tables are not supported? It still says "An entity type that isn't mapped to a table must be mapped to insert, update and delete stored procedures." but the code doesn't allow any SP mapping to non-tables.

throw new InvalidOperationException(RelationalStrings.StoredProcedureUnmapped(entityType.DisplayName()));

<data name="StoredProcedureUnmapped" xml:space="preserve">
<value>The entity type '{entityType}' was configured to use some stored procedures and is not mapped to any table. An entity type that isn't mapped to a table must be mapped to insert, update and delete stored procedures.</value>
</data>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants