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

Bad custom schema attributes #44

Open
Konohomaru opened this issue Nov 12, 2021 · 4 comments
Open

Bad custom schema attributes #44

Konohomaru opened this issue Nov 12, 2021 · 4 comments

Comments

@Konohomaru
Copy link

Is it possible switch from custom schema mapping attributes such as DatabaseTable, DatabaseColumn to default attributes from System.ComponentModel.DataAnnotations.Schema?

@mikebeaton
Copy link
Member

Hmmm I will look at this - thanks for the suggestion.

There are ofc multiple options for schema attributes, at the time I settled on the solution which seemed most 'Mighty-like' to me (!), resonably nice, accessible syntax but powerful enough for most reasonable use-cases.

Perhaps you could confirm the motivation, I assume just to be more 'standard', and compatible with something people are likely to be used to or to use elsewhere already? (And/or to work with other (micro-)ORMs at the same time?)

@Konohomaru
Copy link
Author

There are two layers in my solution: domain and server. In the domain layer there is only the business logic of my application, in the server layer there are all technical solutions. MightyOrm in my case is also a technical solution and is hidden in the server layer. However, due to custom mapping attributes, my domain layer still depends on MightyOrm.

@mikebeaton
Copy link
Member

I mean, just thinking about it, you would ideally like to get the database layer code not mentioned in the the domain layer. But System.ComponentModel.DataAnnotations.Schema is database layer code. So you'd just prefer to use MS standard database layer annotations, not database layer annotations which are specific to the technical solution you are using. Does that sound correct?

@Konohomaru
Copy link
Author

Yes, you are right. But I realize another side of this question. That's when we can use default tools it is good practice to use default tools. Because more people are familiar with it. Also some custom attributes looks like default is not enough and the question is why.

@Konohomaru Konohomaru closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@mikebeaton mikebeaton reopened this Oct 18, 2023
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

2 participants