Editor with PHP/Oracle cannot insert new row (lastInsertId)

Editor with PHP/Oracle cannot insert new row (lastInsertId)

smetolsmetol Posts: 8Questions: 2Answers: 0
edited July 2016 in Editor

I am trying to use the Editor with Oracle server 12c. It is working OK, except for inserting new record, where I receive **SQLSTATE[IM001]: Driver does not support this function: driver does not support lastInsertId(). **
Probably I should modify \lib\Database\Driver\Oracle\Result.php, function insertId(), using helper query "SELECT MAX(id) as my_last_id FROM my_table".
Can anyone hint me, which class to use, and how ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Answer ✓

    I'm afraid this is a know limitation with Editor and its beta Oracle integration at the moment - sorry. Editor 1.6, which I expect to drop in around two months, will have complete support for Oracle (a little reworking of the database abstraction that Editor uses is required for that).

    In the meantime, I think you are correct, the workaround would be to override the Result class's insertId method.

    Allan

  • smetolsmetol Posts: 8Questions: 2Answers: 0

    Thank you, I will wait...

  • RalphWardRalphWard Posts: 6Questions: 2Answers: 0

    Hi Allan, I'm using editor against oracle at the moment in .net and I'm fixing things as I see them. Would it be helpful if I sent you fixes I was making, or are you close to releasing 1.6?

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    1.6 is now out, but as always, Editor is constantly evolving! If you find any issues with the Oracle integration in 1.6, bug reports are most welcome so I can fix them.

    Allan

This discussion has been closed.