[coldbox-4.2.0] ormReload not updating model

134 views
Skip to first unread message

Yieng

unread,
Jul 8, 2016, 11:57:11 PM7/8/16
to ColdBox Platform
Hi,

I have the following in Application.cfc in the onRequestStart function so I can reload the ORM whenever I make changes to the models:

   if( structKeyExists(URL,"ORMReload") ){
            ORMReload();
   }

Whenever I need to reload ORM, I would append the following:
 ?ormReload

This used to work in ColdBox 3.8, however after upgrading to ColdBox 4.2.0, it hasn't worked, unless I change the following in Application.cfc:

 this.sessionTimeout = createTimeSpan(0,0,0,0);
 this.applicationTimeout = createTimeSpan(0,0,0,0);

Refresh the application framework, i.e. ?fwreinit=1. Then reset the session and application timeout back to 30 minutes, say.
What has changed from coldbox 3.8 to 4.2? What am i doing wrong?

Please note in this.ormSettings struct I have the following (partial snippet):
     dbcreate = "update",
     eventhandling = true,
     flushAtRequestEnd = false


Sana Ullah

unread,
Jul 9, 2016, 7:26:00 AM7/9/16
to col...@googlegroups.com
Hi Yieng,

ORMReload() is CF function and its nothing to do with ColdBox, Make sure that file caching " " is disabled in cf admin-console.



--
--
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 post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/7966106a-ade6-43e1-bb0c-f935c94fff92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

br...@bradwood.com

unread,
Jul 10, 2016, 12:17:17 AM7/10/16
to col...@googlegroups.com
This used to work in ColdBox 3.8, however after upgrading to ColdBox 4.2.0, it hasn't worked

Can you unpack this for us?  What doesn't work?  Is there an error?  Does your app not behave as expected?  Are code changes not picked up?  If so, what kind of code changes?  Perhaps some debugging code (dump/abort) will show you if the ORMReload() function is actually running.  Also, what version of ColdFusion or Lucee are you using?

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--

Yieng

unread,
Jul 11, 2016, 9:00:40 PM7/11/16
to ColdBox Platform
I am using Adobe ColdFusion 11 and ColdBox 4.2.0. I have now found out that if:
  • I have not logged into the Coldbox application, then running the ormReload won't create the new table in the databases if I added a new model.
  • I have logged into ColdBox application, then running the ormReload will create the new table in the database if I added a new model.

br...@bradwood.com

unread,
Jul 11, 2016, 9:24:13 PM7/11/16
to col...@googlegroups.com
That's quite an unexpected observation.  Mostly because CF's ORM engine has no concept of your application's login.  Is there any particular code in your application that only runs when you're logged in that might make a difference?  I don't think it's possible that the login is directly the reason for the behavior, but there must be something different about how the app behaves when you're logged in that affects it.
--------- Original Message ---------
Reply all
Reply to author
Forward
0 new messages