The idea would be if you had an orm class Foo then you could call Foo.bars and get all the Bar instances that contain the value in Foo.pk.
There are three variable name so look for:
ies -> y, so something like cities should be reduced to city
es -> ""
s -> "", so foos should be reduced to foo
The tough part is figuring out how to find the orm class, you can take the current module of the orm who called the property and work backwards, looking at each parent module and finding all the orm classes in that module and submodules of that module, this runs on the assumption that people group up their orm modules like we've always done (we always have a models module that contains all the orms) or something else? Not sure what.
The idea would be if you had an orm class
Foo
then you could callFoo.bars
and get all theBar
instances that contain the value inFoo.pk
.There are three variable name so look for:
cities
should be reduced tocity
foos
should be reduced tofoo
The tough part is figuring out how to find the orm class, you can take the current module of the orm who called the property and work backwards, looking at each parent module and finding all the orm classes in that module and submodules of that module, this runs on the assumption that people group up their orm modules like we've always done (we always have a
models
module that contains all the orms) or something else? Not sure what.