我在应用程序中有一个表单,其中有一个从实体中填充的下拉列表。我已经配置了一个query_builder来过滤下拉字段中的值。SELECT g2.id FROM MyBundle:OtherFixedCost c JOIN MyBundle:GlCode g2)") ));我正试图使用查询生成器--与使用以下DQL所做的相同
SELECT g
这是两个有很多关系的模型。现在,我想按类别名称查询主题。topic_id from topic_categories where category_id IN (select id from category where name ILIKE '%tech%'));这样的原始问题是,如何用gorm以更高的性能和更好的可读性来做到这一点。type Category struct {}
type Topic struct