Name-able references #770
Replies: 3 comments 1 reply
-
Hi, inflection (converting singular/plurals, etc) can indeed be made better. If you can point out the specific places you bumped into a simplistic "tacked-on" 's', we could address those (please feel free to open an issue). We've initially started with simplistic inflection, well, for the sake of keeping things simple (and avoiding staying off-focus with "which kinds of english inflection we want" eg. people vs persons). Regarding references, maybe you mean the using the same table for a reference and discriminating by a type column? |
Beta Was this translation helpful? Give feedback.
-
I am not Zamu-Flowerpot (OP) This was resolved by PR 955 which you merged earlier today, in my opinion. I too was waiting for this :D I would mark this as resolved by PR 955 |
Beta Was this translation helpful? Give feedback.
-
I am a bit confused with the correct use, and I believe I found conflicting information. In general should I use Also, RE: inflections — this Rails reference might help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One thing I think that is currently not properly taken care of is the fact that all references have to be named as a singular table name and it expects the plural for that table to just be a tacked on 's'.
This is not great since there are plenty of words that pluralize differently; additionally, what happens when there is multiple references to user in a single table.
First example that comes to mind a Ticketing system where you have a reporter and a assignee for the ticket. I know I could just work around this by making Reporter and Assignee tables which point to user, but that feels wrong and very inefficient from a DB perspective.
Maybe I've just gotten it wrong or I misunderstood how to use the
generate model
subcommand?If this is just missing functionality, then I definitely recommend something like
assignee:references(user)
as the type declaration.Beta Was this translation helpful? Give feedback.
All reactions