Differences between New / CreateObject () and EntityNew () in CF9 for Permanent CFCs?

What are the differences (if any) between New / CreateObject () for creating an object vs EntityNew () for creating an object in CF9 for permanent CFCs?

+3
source share
2 answers

quote from: Exploring ColdFusion 9: EntityNew () vs NEW Operator / CreateObject ()

I really asked this question during the “Advanced ORM” session at CFUNITED and got a slightly different answer. The speaker (forgive me for recalling his name - I think he was the head of the Adobe engineer), told me that when you load an object using EntityNew (), ColdFusion actually represents it somewhat more than standard CFCs. Although this difference is not noticeable to the programmer, a component created using EntityNew () does allow the level of integration efficiency in sleep mode. Thus, he recommended that all new ORM-enabled objects be created using EntityNew ().

+2
source

Using New () and CreateObject () you need to specify the full path to the CFC.

With EntityNew (), you just need to pass the name of the object.

+3
source

Source: https://habr.com/ru/post/1716346/


All Articles