You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by cfcoder March 1, 2024
In the project i'm on, we are in the midst of switching from an old database to a new database. Old is HSP and new is FPMA (for referencing below). I'm needing to create a new page based on the new database that lists the projects in the new database. The old db had projects but the table was called something else. So the projects.cfc controller simply used the following to get the list of all projects.
projects = model('Project').findAll();
The Project.cfc model config would simply set the table name using the table() function as the table was not called "projects" in the old db.
I'm now trying to use the dataSource() function to override the data source name to use the new DSN FPMA, but it's not working for my new page. I change the config contents for Project.cfc model to be:
dataSource("FPMA");
and in the new Projects.cfc controller index action, I first off call that same line above:
projects = model('Project').findAll();
But now it throws an error saying there is no projects table in the database. There is in FPMA but not in HSPTest.
I think there is an issue here.
The text was updated successfully, but these errors were encountered:
Discussed in #1410
Originally posted by cfcoder March 1, 2024
In the project i'm on, we are in the midst of switching from an old database to a new database. Old is HSP and new is FPMA (for referencing below). I'm needing to create a new page based on the new database that lists the projects in the new database. The old db had projects but the table was called something else. So the projects.cfc controller simply used the following to get the list of all projects.
The Project.cfc model config would simply set the table name using the table() function as the table was not called "projects" in the old db.
I'm now trying to use the dataSource() function to override the data source name to use the new DSN FPMA, but it's not working for my new page. I change the config contents for Project.cfc model to be:
and in the new Projects.cfc controller index action, I first off call that same line above:
But now it throws an error saying there is no projects table in the database. There is in FPMA but not in HSPTest.
I think there is an issue here.
The text was updated successfully, but these errors were encountered: