Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8591187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:28:09+00:00 2026-06-11T23:28:09+00:00

Is it possible to re-use ColdFusion ORM objects across applications? For example, I set

  • 0

Is it possible to re-use ColdFusion ORM objects across applications?

For example, I set up an ORM-enabled application named app1 in a folder named app1. I created a department.cfc that corresponds to a department database table:

<cfcomponent>
<cfset this.name = "app1"> 
<cfset this.ormenabled = "true">
<cfset this.ormSettings = {
    datasource = "myDS",
    schema = "mySchema",
    dialect = "Oracle10g",
    logSQL = "false"
}>

I can load and dump the contents from a CFM file:

<cfset item = EntityLoad("department")>
<cfdump var="#item#">

Then I set up an identical ORM-enabled application named app2 in a folder named app2. I created a department.cfc there that extends the department.cfc in app1:

<cfcomponent persistent="true" extends="my.path.app1.department">
</cfcomponent>

When I try to load and dump the contents, I get an error:

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.

I have verified that the path is correct. E.g. I was able to instantiate the object using CreateObject:

<cfset item = CreateObject("component","my.path.app1.department")>
<cfdump var = "#item#">

I am hoping that I can refer to a single CFC and re-use the object, but unless I’m missing something it looks like it may be necessary to recreate the object in app2.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:28:11+00:00Added an answer on June 11, 2026 at 11:28 pm

    The CFC (entity) can be instantiated within two distinct applications where they each use their own ORM. All you need to do is place the them in this central location on the server and perhaps create an application specific/global file mapping and you can then create new instances. The most convenient way however would be via the “this.ormSettings” variable within your application.cfc as you can do it all in one place.

    for instance:

        component displayname="Application"
        {
            this.ormSettings = {
                cfclocation = [
                    "/full/path/to/cfc/directory", 
                    "Entity",
                    "/a/relative/path" 
                ]
            };
    
            this.mappings["/Entity"] = "full/dir/path/to/another/cfc/directory/called/whatever";
    
        }
    

    Each of these locations will be searched for a matching CFC before any other directories, so there is also a potential performance benefit by defining them explicitly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do you configure ColdFusion 9's ORM to use multiple DSNs if possible? Is
Is it possible to use an ActiveX/COM object from ColdFusion? If so, where's the
Is it possible to use JavaScript to set the cursor attribute to the property
Is it possible to use a bitAnd() condition in coldfusion QoQ SQL? I have
Is it possible use mod_rewrite to resolve addresses hosted on another server? Say I
Is it possible use a MySQL query to perform this kind of check? If
I need a control having these features: It should be possible use it in
Is possible to use ArcSDE API in .NET(C#) ? http://edndoc.esri.com/arcsde/9.2/api/capi/dbconnects/dbconnects.htm Thanks
Is this possible to use Ajax.Beginform with update target inside of ajax form. like
Is it possible to use JMF in Android? JMF has good functionality? I'm basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.