Closed lucasgmagalhaes closed 2 years ago
Hello @lucasgmagalhaes ,
The issue is that the Map
only map the property to the column you specified.
However, the key method doesn't use the column name you specified in the Map
property. So you need to map it again to the right column name
mapper.Key(x => x.UnbId, "unb_id")
.Key(x => x.GeoId, "geo_id")
.Key(x => x.ProgramCode, "programe_code")
.Key(x => x.ReferenceDate, "reference_date")
.Key(x => x.Start, "start")
.Key(x => x.End, "end")
We will check on our side how we could force the key to use either name you specified in the Map
method (such adding a boolean since we need to say backward compatible) or adding a new method that will be specified for this.
Best Regards,
Jon
Hello @lucasgmagalhaes ,
Did you try our alternative solution using multiple key methods?
After some discussion, I do not think we will do anything with the Map
method.
When I try to map an entity with composite keys that references to columns in database with snake case naming this error is thrown:
I'm trying to do a bulkMerge: