-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added method Utils::add_irregular for managing irregular names #265
Conversation
Thanks a lot for the patch! Would you mind fixing your whitespace so that it follows our project's convention? |
Thanks for the contribution, @bashaus. IMO, automatic inflection of table names just adds a big hunk of complexity that isn't necessary. Is making a dev match the classname to the table name or provide the name of his table in each class definition that onerous? Not trying to start a flame war... So many other ORMs use this logic, maybe there's room for a separate library to perform this functionality at this point...? |
Sorry, didn't mean to close this. O_O |
While I agree that it would be a great idea to have an external inflection library controlling names, I think this solution is a quick fix for those people who encountered the same problem that we did (described above). |
@bashaus Absolutely agree. Don't mind my kvetching... ;) |
I've encountered the same issue with the inflector and this is an effective workaround. It'd be great to see this pulled in. |
Agreed, this would be a great workaround. +1 |
Bugfix - Bigint cast
Hey @jpfuentes2 , this one has been floating around for a while. Can we get this merged for the next release? |
Can you merge master into your branch? There's a single conflict:
|
I suggest rebasing. But, I also vote for an external library for inflections, as a configurable option of course. For example my |
Definitely rebase :) |
@bashaus , if you can take care of that I will merge. |
Conflicts: lib/Utils.php
@jpfuentes2 - ready when you are, thanks! |
Added method Utils::add_irregular for managing irregular names
This pull request adds a new method to the Utils class which allows for the dynamic addition of irregular nouns. This method is for those special cases.
Use case:
We have a table name called "Skus" which would be singularised to "Skus" because the ending of the word was "us". We added the "add_irregular" method to circumvent this issue.