Composite key as row id

Composite key as row id

geist0geist0 Posts: 10Questions: 2Answers: 0
edited May 2016 in Editor

Dear All,
is that possible somehow to pass into idSrc a composite key? As I have associative table and identify records by key composed from two foreign keys, I don't have an unique single ID.

Have a nice day.

This question has an accepted answers - jump to answer

Answers

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

    Hi,

    Unfortunately the Editor PHP and .NET currently does not current support composite keys. This is something that will be address with the Editor 1.6 release (which will be sometime this summer).

    Regards,
    Allan

  • geist0geist0 Posts: 10Questions: 2Answers: 0

    Hi Allan!
    Thank you for quick replay; I will then rebuild a table :)

    Have a nice day,
    Rafal

  • mike92117mike92117 Posts: 40Questions: 12Answers: 1

    I could really use composite key support. Can you provide an update?

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

    Its coming in Editor 1.6, which should drop at the start of December.

    Allan

  • DavidHarkerDavidHarker Posts: 11Questions: 2Answers: 0
    edited December 2016

    Hi Allan, I have recently upgraded to 1.6 and I am using the js and css only option, has the ability to use a composite key being implemented? I just can't seem to find any documentation on it. Cheers :)

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

    Yes. The compound key aspect is almost all server-side code though - so for Editor that was in the .NET and PHP code (e.g. PHP docs on the topic).

    The client-side doesn't really need to know anything about the fact that there is a compound key. It just needs to get a primary key value for each row. The way I've implemented that for the PHP and .NET libraries is to read the two (or more) fields from the database, combine them and tell the client-side that is the row's id. Then when it submits and sends that id to the server, it can split it and use the component parts.

    So from the client-side aspect (i.e. JS+CSS only) it was actually always able to support compound keys - its all about how the server handles it the new support.

    Allan

  • bvelasquezbvelasquez Posts: 28Questions: 7Answers: 0

    So, I don't understand. How would you get this to work if you only have access to client side? I've tried several things, such as defining the composite key in the options, but I haven't seen an example so maybe I am doing it wrong. Hope you can help.

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

    Hi,

    Could you clarify what you mean by access only to the client-side please? Is there a server-side data store that you don't have write privileges to, or is there simply no server-side component at all and everything is stored on the local browser only?

    Thanks,
    Allan

This discussion has been closed.