Compound Keys

Compound Keys

ayzayz Posts: 51Questions: 18Answers: 0
edited April 2018 in Free community support

In Editor PHP documentation ->Getting started -> Basic Initialization -> Compound keys, you state that '...you must submit the data...Editor cannot ...read information that is generated by the database.'

Does this mean that if an auto-increment integer field is part of the compound key, things would fail (since the increment, hence new value, is being generated by the database?) I believe if a single key (say 'id') is used and this is auto-incremented by the database, Editor works just fine.

Please clarify.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    This is unfortunately correct. The problem with reading the compound key information was that I couldn't find a cross database way to reliably get the latest values inserted by a compound key. With a single column primary key that isn't a problem - all databases provide a way to do that, but with a compound key its more difficult. I think it was Oracle that was giving me the biggest problems, but I can't really remember now! I do remember they were all a bit different!

    Allan

This discussion has been closed.