problem with join and create-update in the editor

problem with join and create-update in the editor

UMR5558UMR5558 Posts: 41Questions: 13Answers: 0

Hello everybody.
In my postgresql database i split a table into 3 tables, 1 master (TM) et 1 daughters (td). t1 is linked with TM by theses columns TM.id, td.TM_id and a foreign key in td daughter table (FOREIGN KEY (TM_id) REFERENCES TM(id)).
I create a datatable with an editor for my master table TM.
In the js file editor i call a td field by using - "name": "td.field" -.
In my php editor file i use this syntax - Field::inst( 'td.field' ) - and a join like this ->leftJoin( 'td', 'td.TM_id' , '=', 'TM.id' )
For testing i put data via my phppgadmin interface.
My datatable is working well.
When i open the editor is working well with all the data in all the fields of my 2 tables TM and td.
But if i update or if i create a new line i have an error like this:

An SQL error occurred: SQLSTATE[42P01]: Undefined table: 7 ERREUR: entrée manquante de la clause FROM pour la table « TM » LINE 1: SELECT TM.id as "TM.id" FROM td WHERE TM_... ^

I already use this configuration and these sources with the DataTables Editor v1.5.5 version and it was working wery well. Now i use DataTables Editor v1.8.0.

Can you help me to find a solution please.
Lionel Humblot

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi Lionel,

    I believe this was a bug in 1.8.0. Could you update to 1.8.1 which was just released yesterday please?

    Thanks,
    Allan

  • UMR5558UMR5558 Posts: 41Questions: 13Answers: 0

    Hello. I dowload the last version 1.8.1 and it's working. sorry for the disturbance

  • UMR5558UMR5558 Posts: 41Questions: 13Answers: 0

    Thanks a lot Allan. Have a nice day.
    Lionel

This discussion has been closed.