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

Re-consider patterns used to set metadata from conventions #7410

Closed
ajcvickers opened this issue Jan 13, 2017 · 2 comments
Closed

Re-consider patterns used to set metadata from conventions #7410

ajcvickers opened this issue Jan 13, 2017 · 2 comments

Comments

@ajcvickers
Copy link
Member

See #7301. Currently we have a mechanism for metadata set by convention where attempting to set that piece of metadata may or may not actually do something based on whether or not setting that things is valid. It would be good to consider whether or not this is the best approach given:

  • There are places, such as in Don't throw when SqlServer ValueGenerationStrategy is configured on an incompatible property by a convention #7301, where a convention should never try to set metadata that is invalid, so it may be that this code is never actually used.
  • It needs to be clear from API/documentation that a convention is doing a try-set rather than a set. This will likely require API changes.
  • It may be better for the convention itself to determine whether it is valid to set a property. This is likely to make it easier to understand what the convention is really doing. Also, if it turns out that there only a few conventions that need to do this, then we could end up removing significant code that is not used--see first point.
  • If there are common things that conventions need to check, such as whether or not something has already been set explicitly, then this could be extracted into common code used from conventions without it being an integral part of every API.
@AndriySvyryd
Copy link
Member

This is related to #214

@rowanmiller
Copy link
Contributor

Merged info into #214

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants