-
-
Save elpete/ae7b5926a2f8ee97b9c6058626cd5182 to your computer and use it in GitHub Desktop.
Lucee datasources created in Application.cfc not available in the psuedo-constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
// this datasource needs to be accessible | |
this.datasources["coolblog"] = { | |
class = "org.gjt.mm.mysql.Driver", | |
connectionString = "jdbc:mysql://localhost:3306/coolblog?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true", | |
username = "root", | |
password = "coolblog" | |
}; | |
// uncomment this line to make it pass | |
// cfapplication( datasources = this.datasources ); | |
// this call will fail with no datasource being found | |
cfdbinfo( type="Version", datasource="coolblog", name="info" ); | |
writeDump( var = info, top = 2, abort = true ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Intentionally left blank ---> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment