ColdFusion 9.0 Resources |
Many-to-one relationshipConsider a many-to-one relationship where many employees belong to a single department. You can use code like the following to define a many-to-one mapping between the Department and Employee objects. public class Employee { [Id] var id:uint; [ManyToOne(targetEntity="Department",fetchType="EAGER(default)|LAZY")] [JoinColumn(name="deptId",referencedColumnName="DEPT_ID")] var dept:Department; } The default fetchType value is EAGER. See Lazy loading and fetch type for information on fetch types |