Closed jfernstad closed 7 years ago
This is in fact probably how we would do this. The inflect library doesn't always catch everything, hence all the exceptions that already exist. I'd accept this as a PR if you'd like to make one :)
Ok, here's the pull request. š š
If you're having a generation problem please answer these questions before submitting your issue. Thanks!
What version of SQLBoiler are you using (
sqlboiler --version
)?SQLBoiler v2.4.0
Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
Using MySQL.
Further information. What did you do, what did you expect?
Hi there, so the issue seems to be the table name
areas
. It will generate the structAreas
and also the global functionAreas
, resulting in a compilation error:If I change the name to
cars
, everything works. I verified this by addingareas
to theTestSingular
test forstrmangle
and it failed, see diff below. Addingareas
toTestPlural
works as expected, the issue seems to be to convertareas
toarea
. The diff below also contain a fix, but it might not be the general fix (why this is an issue and not a pull request). It just addsareas
andarea
as specific singulars instrmangle/inflect.go
.Unclear how this affect other words but it's a problem for us.
Thanks