Whatever message this page gives is out now! Go check it out!

EntityLoadByPK

Last update:
May 18, 2026

Description

Loads and returns an array of objects for the specified primary key. Use this function to avoid specifying the boolean parameter that you must specify with the EntityLoad() function.

Returns

object

Category

Function Syntax

entityLoadByPK( entityName ,id)

Parameters

Parameter
Description
entity name
Name of the entity to be loaded.
id
Primary key id

See Also

EntityLoadEntityReloadEntityLoadByExampleEntityDeleteColdFusion ORM chapter in Developing ColdFusion Applications

History

ColdFusion 9: Added this function.

Example

<cfscript> 
 art = EntityLoadByPK("Art", 1); 
 writedump(art); 
 </cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page