小编Rob*_*zog的帖子

ColdFusion ORM关系

在ORM之前,如果我想显示规范化表的组合输出,我只需要快速进行CFQUERY,在我想要的字段上连接表并显示输出.我只是不能用ORM把头包裹起来.

例如,使用这两个表:

customers
(id,
 name,
 customerType)

customerTypes
(id,
Name)
Run Code Online (Sandbox Code Playgroud)

当customerType中的customerType字段链接到customerTypes中的id时,您将如何创建可以加载以显示以下内容的单个实体?

customers.id, customers.name, customerTypes.name
Run Code Online (Sandbox Code Playgroud)

我出于某种原因走过的所有ORM关系示例都无法让我理解如何去做.看起来很简单就是杀了我.任何有助于对此有所帮助的人都将不胜感激!

coldfusion orm

5
推荐指数
1
解决办法
315
查看次数

标签 统计

coldfusion ×1

orm ×1