Is there a way to query with a static value?
I have three tables: - tx_news_domain_model_news Fields: - uid - sys_category_record_mm Fields: - uid_foreign - uid_local - tablenames - sys_category Fields: - uid - title
Joins: - tx_news_domain_model_news.uid=sys_category_record_mm.uid_foreign - sys_category_record_mm.uid_local=sys_category.title
So this is a classic many-to-many association and should not be a big deal but when querying sys_category_record_mm i have to set sys_category_record_mm.tablenames="tx_news_domain_model_news".
Is there any chance doing this in gorm?
The document you expected this should be explained
Generally in the associations documentation
Expected answer
A solution or at least a hint probably haha
Comment From: github-actions[bot]
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days
Comment From: saeidee
You may try hooks, also based on your table structure, I am feeling you could use https://gorm.io/docs/has_many.html#Polymorphism-Association.