Search code examples
hibernatecoldfusioncoldfusion-9

Coldfusion Entity Association. What is the default setting for "lazy"


Does anyone know what the default setting for lazy is with an entity association? So if I have an association, is the association being lazy loaded or eager loaded when I don't specify?

for example

property name="Groups" fieldtype="many-to-many" cfc="ProfileGroup" type="array" singularname="Group" linktable="profile_group" fkcolumn="profileID" inversejoincolumn="groupID";

Will the Group entity be lazy or eager loaded, given I haven't specified which I want.

I just couldn't find this anywhere.. even the official CF documentation didn't say.

Thanks


Solution

  • Default fetch mode is, according to JPA & Hibernate,

    *-to-many => lazy

    *-to-one => eager

    It is distinct that RHS many should be lazily loaded, when RHS one should be eagerly loaded.