Closed grandsilence closed 4 years ago
My guess is that mixing manual mapping and conventions does not work. Can you try it without configuring the manual mapped?
Without manual mapped it has the same behavior
I have the same issue, did you have any luck solving it?
The project it is in is open source and I pushed it in the state with the error so it can be looked at: https://github.com/StefanJanssen95/steam-web-api-wrapper/tree/2fe3d1c16d9cc9b12477f3d251a16dd4fc53d4e4
I hope you don't mind dirty code, I have not yet spend any time on the architecture. EvilRabbot.Data is the class library project which is calling the database and has the mappings in the Context class which is called from EvilRabbot.Bot
The following is the SQL to create the database
CREATE SCHEMA EvilRabbot
CREATE TABLE config_settings
(
id SERIAL PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
value TEXT NOT NULL
)
CREATE TABLE users
(
id SERIAL PRIMARY KEY NOT NULL,
snowflake_id BIGINT NOT NULL,
last_known_username TEXT NOT NULL,
last_message_date TIMESTAMP NOT NULL
)
I found out why my code was not working. For retrieving data I used my own SQL function which was executed by Dapper itself. For updating I was using the Dapper.Contrib function which does not use the configured column names.
This should be fixed in https://www.nuget.org/packages/Dapper.FluentMap.Dommel/1.7.1.
Hi. I'm trying to convert
MyCustomProperty
tomy_custom_property
column (snake case) globally (for Postgresql). ButConvention
not applying to my model or even assembly namespaces.Initialization:
My
Convention
:ToSnakeCase() working well.
Result SQL:
Expected SQL:
PropertyTransformConvention
constructor called but column names stays unchanged. Thank you.