Entity Naming Filters
I propose a way to filter entity names via regex configuration in yml
A pattern will be used to extract the entity name and optionally apply a prefix or suffix. For example, if the table name is "tblEmployees", the pattern ^tbl(?<ClassName>.*?)$ will extract "Employees"
If the pattern does not match no change will be applied to the entity name,
The extracted name can be prefixed or suffixed further.
To match all tables and apply a prefix, one might use the pattern ^.*?$.
example configuration in generation.yml under data > entity
entityNamingFilters:
- pattern: ^tbl(?<ClassName>.*?)$
prefix:
suffix:
- pattern: ^vw(?<ClassName>.*?)$
prefix:
suffix: View
Alternatively, we could use a replacement pattern:
entityNamingFilters:
- pattern: ^tbl(?<ClassName>.*?)$
replace: $<ClassName> # dunno what the standard is for replacment of named groups
- pattern: ^vw(.*?)$ # non-named group
replace: $1View
This now in version 5+. See https://efg.loresoft.com/en/latest/ef/entity/#configuration