nhibernate / fluent-nhibernate

Fluent NHibernate!
BSD 3-Clause "New" or "Revised" License
1.66k stars 686 forks source link

[Feature] Create a convention interface for NaturalId (INaturalIdConvention) #607

Open alexmurari opened 1 year ago

alexmurari commented 1 year ago

Discussed in https://github.com/nhibernate/fluent-nhibernate/discussions/518

Originally posted by **alexmurari** January 13, 2022 Hi, I'm looking for an interface like `INaturalIdConvention`, so I can apply the same casing style to the names of the columns that make up the natural id of my table. `NaturalId().Property(t => t.SomeProperty, /* Make column name snake case */); // <-- I want to move these to a convention.` Is there some way to do it using conventions? Or just manually for each natural id map?
hazzik commented 1 year ago

I've fixed a bug where conventions were not applied to members of <natural-id>. It should be available on NuGet shortly.