Before ORM, if I wanted to display the combined output of a normalized table, Id just does a quick CFQUERY, joins the tables in the fields I want, and displays the output. I just can't wrap my head using ORM.
For example, using these two tables:
customers
(id,
name,
customerType)
customerTypes
(id,
Name)
How do you create a single object that you can load to display the following when the customerType field in the client is associated with an identifier in customerTypes?
customers.id, customers.name, customerTypes.name
For some reason, all the examples of ORM relationships I went through for some reason cannot figure out how to do this. It seems so easy to kill me. Any help shedding some light on this would be appreciated!
source
share