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

Database Schema Discussion for ID #65

Closed
WillStrohl opened this issue Sep 20, 2021 · 5 comments
Closed

Database Schema Discussion for ID #65

WillStrohl opened this issue Sep 20, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@WillStrohl
Copy link
Member

I've noticed that the ID columns are literally named 'ID`. This issue is here to discuss if we want to change that before this module has an official release to prevent potential issues in the future since this is a reserved word.

@WillStrohl WillStrohl added the enhancement New feature or request label Sep 20, 2021
@WillStrohl
Copy link
Member Author

@david-poindexter @valadas FYI...

@valadas
Copy link
Member

valadas commented Sep 20, 2021

Can you define what you mean by Id being a reserved word?

I always use Id because then you can have a base class for your entities and do generic stuff that works with any entity

@WillStrohl
Copy link
Member Author

D'oh! Never mind. Got my SQL crossed. ID is okay. :)

https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-ver15

@WillStrohl
Copy link
Member Author

However, a more specific ID naming convention is often better/easier and less error-prone when more complex queries are needed to be made.

@donker
Copy link
Member

donker commented Nov 12, 2021

Yep. My pattern follows the rest of DNN where we use WidgetId to reference the ID of a Widget. I agree we should attempt to ensure we make a good start with this module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants