Custom Table Type References not validated
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
- SqlPackage or DacFx Version: 170.0.94
- .NET Framework (Windows-only) or .NET Core: .NET Core
- Environment (local platform and source/target platforms): N/A
Steps to Reproduce:
Create a sqlproj with the following script:
CREATE TYPE TableType as TABLE (
MyColumn int
)
GO
CREATE PROC TestProc(@L TableType READONLY) AS
SELECT FakeColumn from @L
- Expected: Build error
Procedure: [dbo].[TestProc] has an unresolved reference to object [dbo].[TableType].[FakeColumn] - Actual: Project builds with 0 warnings and 0 errors.
This error is only discovered at deployment, which is a bad time to catch these issues. These types of errors are caught for tables/views but not for table types it seems.
Did this occur in prior versions? If not - which version(s) did it work in?
(DacFx/SqlPackage/SSMS/Azure Data Studio)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided sqlproj script using SqlPackage or DacFx 170.0.94, focusing on the custom table type and TestProc reference. Trace how build validation handles references from tables and views, then ensure the analogous TableType reference reports the unresolved FakeColumn error during build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100