-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Dapper.Contrib - Implemented ColumnNameMapping #653
Conversation
This is duplicate in terms of functionality, not in implementation: #623 |
Note: there are quite a few other changes in here which may or may not be intentional effects:
|
Method signatures: I don't really see how this is breaking? The behavior from the "outside" is the same. Column names for Postgres: Column names quoting in Postgres is just fixed and not breaking, the old behaviour was somewhat incorrect. That is fixed, but it's certainly not a breaking in change. |
Hope the above clarifies. I'm not against quoting in v2, but that has to be a major version change and we'll have to be very explicit about it in a breaking changes section. |
Methods: Columns: |
@frankhommers Nope, I wouldn't pull it then. This is simply ill-suited for a non-breaking-changes release. We need to revisit column quoting entirely in V2. And it's not simple a Postgres problem. I also don't know how columns will end up, this is one of over a dozen proposals on columns. The thing is, to be blunt, a damn mess. We'll likely have a We need a full API discussion around Column mapping for .Contrib, which will also affect Dapper core, as that has to read the columns as well. And of course there are performance concerns there. |
OK. I really hope you can put the idea into V2 then. Writing a single function that converts all names in your POCO's to the database fields is just awesome. Just one place to capture your naming conventions! Instead of littering the whole solution with attributes and mappers. |
@frankhommers Sorry I've been so busy, but I wrote up an issue for discussion in #722, I'd love your thoughts - can you please chime in? I'm closing out all of the existing PRs on the issue because of the reasons above...this needs to be a far deeper change/feature...and nothing yet would be near usable for that. |
I would love to see this pulled!
This will allow you to write a custom Property.Name to column mapping.
The default behaviour does not change.
The example code changes the mapping from property PersonId to database field person_id.