nicholas-ross / SSMS-Schema-Folders

This an extension for SQL Server Management Studio (SSMS). It groups sql objects in Object Explorer (tables, views, etc.) into schema folders.
GNU General Public License v2.0
159 stars 34 forks source link

Problem with schemas that include a period "." #27

Closed cawise closed 1 year ago

cawise commented 2 years ago

We are using multi-part schemas ("sub-schemas", if you like) that include a dot to separate the "parent schema" from the "sub-schema" like [Technology.Logging]. In most cases, this extension works as expected. However, when the table name happens to be a prefix/substring of the "sub-schema", it groups weirdly -- as though the table name is removed from the schema name and leaves any remaining letters.

In the image below, you can see a few examples of this. [Technology.LandingPages].[LandingPage] yields "Technologys" [Technology.Logging].[Log] yields "Technologyging"

image001

scottkuhl commented 2 years ago

Should we expect a release with this fix in soon or are you waiting for more issues / features to add before doing one? Just asking to determine if we should pull the code down and do our own internal release or wait for an official one.

Thanks for the quick fix!

nicholas-ross commented 2 years ago

I will be adding Folder Levels for the next release and need to update the localisation of the new features.

Since I'm not sure when it will be complete, I have done a beta release of the current build.

cawise commented 2 years ago

Beta works great! Thanks for the quick fix!

cawise commented 2 years ago

Here's a related issue, but I can open as a separate item if you like.

With these "multipart" schema names, when the Object Display Options > Rename Node option is set to True, it only strips off the first part of the schema name.

image

nicholas-ross commented 2 years ago

Thank you. I am aware of it.

It was a performance consideration I made at the time. To get the accurate object name a call to GetService for each node is required. I'm already doing this once but the rename was a different method and didn't want to repeat the same call. After merging in my folder level code I have decided it needs to be rewritten to parse all the folder levels and name with one call.

nicholas-ross commented 2 years ago

See release v1.4-beta2.

cawise commented 2 years ago

Once again, works well and thanks for the quick fix!