How do you deep clone a persistent entity in ColdFusion ORM?
问题 I have a persistent entity that I'm using as a template: Company Locations Departments Employees In other words, a Company contains many Locations , which contains many Departments , which contains many Employees . I have one Company set up as a template that should be copied when a new company is created. However, this template is persistent in the database. I tried using the following code to deep clone it: var template = EntityLoadByPK("Company", 13); var company = Duplicate(template);