Each New Model Addition Throws Entity Name [Whatever] is ambigous

9 views
Skip to first unread message

J Brockway

unread,
Dec 8, 2020, 11:24:48 AM12/8/20
to ColdBox Platform
Hello,

This is my first post here and I am new to Coldbox but have coded in ColdFusion since version 4. I have been working to get my first Coldbox 6 application stood up and have only been working with Coldbox for a few months (COVID time well spent). I am using cborm with the below settings in my application.cfc:

this.mappings[ "/coldbox" ] = COLDBOX_APP_ROOT_PATH & "coldbox";
this.mappings[ "/myApp" ] = COLDBOX_APP_ROOT_PATH;
this.mappings[ "/cborm" ] = COLDBOX_APP_ROOT_PATH & "modules/cborm";

// ORM Settings
this.ormEnabled = true;
this.datasource = "persorm";
this.ormSettings = {
cfclocation = ["models"],
dbcreate = "update",
logSQL = true,
flushAtRequestEnd = false,
autoManageSession = false,
eventHandling = true,
eventHandler = "cborm.models.EventHandler"
};

My models reside in models/orm and models/orm/option

Models/orm has the supperclass Base.cfc
Models/orm/option has a Base.cfc which extends the models/orm supperclass
All other models extend the Base.cfc in their respective folders

Each time I add a new Model I get Entity Name [Whatever] is ambigous and it states the cfc in question is used twice but there is only one cfc file with said name.

The create orm-crud command does not work because I am extending the model and it cannot find the base component.

The tables all get created in the database as expected with all extended properties.

Is there something I am missing in the process of adding new models?

I am running on macOS Catalina with the following:

*  CommandBox Version: 5.1.1+00191                                                                 *
*  CFML Engine:        Lucee                                                                       *
*  CFML Version:       5.3.6.61 stable (Gelert)                                                    *
*  Java Version:       11.0.6 (AdoptOpenJDK)                                                       *
*  Java Path:          /usr/local/bin/jre/bin/java                                                 *
*  JLine Terminal      org.jline.terminal.impl.PosixSysTerminal                                    *
*  Runwar Version      4.1.2 (/Users/jamesbrockway/.CommandBox/lib/runwar-4.1.2.jar)

Thanks,
James

Daemach

unread,
Dec 8, 2020, 11:34:18 AM12/8/20
to col...@googlegroups.com
Welcome to the scene.  You might consider joining the coldbox and/or cfml slack channels too. 



--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/fc4a0c5d-315f-486d-8d85-94657a9428b2n%40googlegroups.com.

Brad Wood

unread,
Dec 8, 2020, 11:42:17 AM12/8/20
to col...@googlegroups.com
Are you saying there are two base.cfc files?  The error you're reporting seems to be coming from Hibernate, so this isn't really related to ColdBox or CommandBox.  Including the full stack trace may help, but you'll need to search for a hibernate solution to this.

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 



Daemach

unread,
Dec 8, 2020, 11:51:49 AM12/8/20
to col...@googlegroups.com

J Brockway

unread,
Dec 10, 2020, 9:38:41 AM12/10/20
to ColdBox Platform
Thanks for the replies. I found a duplicate model I had overlooked with the same entity name and removed it, so my issue is resolved.

Brad,

I did go down the hibernate path to realize that should be the issue as the error stated, and then I kicked myself when I found the duplicate!

I will have to look into Quick as I keep running across it in my searches.

Thanks!
Reply all
Reply to author
Forward
0 new messages