Details
Assignee
Michael OffnerMichael OffnerReporter
Eric PetersonEric PetersonPriority
CriticalLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
NoneAffects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Eric Peterson
Eric PetersonPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Affects versions
Created 11 January 2018 at 04:16
Updated 26 August 2019 at 18:38
After creating a datasource in
Application.cfc
, I would expect to be able to access it right away. The datasource is not defined, however, in the psuedo-constructor. The datasource can be accessed in lifecycle methods likeonRequestStart
, but not in the psuedo-constructor.The datasource is available in the psuedo-constructor if it was defined in the administrator.
There is a workaround — that is to update the datasources using the
cfapplication
tag, but this shouldn't be necessary as we are still in theApplication.cfc
.ACF 2016 allows me to use the datasource immediately.
You can use this gist to recreate (only two files and a datasource connection are needed):
https://gist.github.com/elpete/ae7b5926a2f8ee97b9c6058626cd5182