readTable() and the underlying table to edit
readTable() and the underlying table to edit
When using readTable()
in the Node/Editor libraries, do the columns in the VIEW have to perfectly match the underlying table that is to be editied? I keep getting "Invalid column name..."
The VIEW doesn't have the all the same columns as the target edit table.
So like, the .readTable()
is the my SQL View... but my .fields()
point to the table I want to edit.
let editor = new Editor(db, 'OnboardingAppointments', 'ProcessingID')
.readTable('vueOA_Admin_Attendance')
.fields(...)
What if I had 3 different VIEWS? And, 1 table to edit?
I thought about using router.get()
... but, are the Editor/Node/Libraries aware that it should use router.get()
after a CRUD operation? If not, how do we make it point to the appropriate api location after a CRUD operation?
Answers
No - you can use the
set()
andget()
methods to tell Editor to use fields only for one or other of the actions - e.g.:Allan