Multiple foreign keys to the same table
Hello! I use mysql with a lot of tables. And now I need to execute query with properties: author, executor, control. All of these uses the same table USERS, how can I resolve this problem without aliases?
P.S.: Thanks for your library =)
@AlexanderSutul thank you for reaching out. I think you are right and I should have named the relations with the name of the relationship (fk constraint) or the foreign key column and not the name of the target table. This is quite a big refactoring and also a breaking change, so I may have to bump the major version. Not sure when, but this is an important improvement, thank you for reporting it!
@mevdschee I very hope it will be soon.
Firstly, I also want to thank you for your library. I am joining waiting to this enhancement and I would like to ask if there is some workaround in the meanwhile. I haven't been able to find solution in mysql - there is no aliases for tables, and views can't have indexes so they can't be used for foreign keys. Any idea? Thanks
Great library. Although it looks like this limitation is going to stop me in my tracks. It would be great to see a solution to this :) Thanks
Good news! Version 2 is almost ready and it has this new feature. Please try the latest beta version out and let me know what you think.