Skip to content

Commit a0f1a32

Browse files
committed
Update GetTopics to use new(er) GetTopicIDByUniqueKey function
In a previous update, `SqlTopicRepository` was updated to use the new(er) `GetTopicIDByUniqueKey` function over the legacy `GetTopicID` function, thus operating off the `UniqueKey` instead of just finding the first instance of a key (4c3d30f). In that commit, we also ensured that `ITopicRepository.Load(string)` calls relied on a fully qualified path (e.g., `Root:Configuration:ContentTypes`). In this update, we extend that to by the default when calling the `GetTopics` stored procedure directly, as well. As with the previous commit, the associated parameter is renamed from `@TopicKey` to `@UniqueKey` to ensure this expected value is clear.
1 parent 6c49524 commit a0f1a32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

OnTopic.Data.Sql.Database/Stored Procedures/GetTopics.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
CREATE PROCEDURE [dbo].[GetTopics]
99
@TopicID int = -1,
1010
@DeepLoad bit = 1,
11-
@TopicKey nvarchar(255) = null
11+
@UniqueKey nvarchar(255) = null
1212
AS
1313

1414
--------------------------------------------------------------------------------------------------------------------------------
1515
-- GET TOPIC ID IF UNKNOWN.
1616
--------------------------------------------------------------------------------------------------------------------------------
17-
IF @TopicKey IS NOT NULL
17+
IF @UniqueKey IS NOT NULL
1818
BEGIN
19-
SET @TopicID = dbo.GetTopicID(@TopicKey)
19+
SET @TopicID = dbo.GetTopicIDByUniqueKey(@UniqueKey)
2020
END
2121

2222
IF @TopicID < 0
2323
BEGIN
24-
SET @TopicID = dbo.GetTopicID('Root')
24+
SET @TopicID = dbo.GetTopicIDByUniqueKey('Root')
2525
END
2626

2727
--------------------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)