idSrc - Double primary key ?

idSrc - Double primary key ?

pedrofdspedrofds Posts: 4Questions: 2Answers: 0

How to use idSrc in many-to-many relationship where the intermediate table has double keys:

You have a "tblEngineer" table

tblEngineer
----------------
(PK) EngineerId
EngineerName

And a "tblTicket" table...

tblTicket
----------------
(PK) TicketId
TicketDetails

You now add a link table called "tblEngineerTickets" (or similar) which references the Ids of both the Engineer and their tickets...

tblEngineerTickets
------------------
(PK) EngineerId
(PK) TicketId
OtherValue

RESULT:

 EngineerId  | TicketId | OtherValue
 ------------+----------+---------
      1      |    1     |    10
      1      |    2     |    10
      1      |    3     |    20
      2      |    1     |    55
      2      |    2     |    52
      2      |    3     |    50

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin
    Answer ✓

    Hi,

    The client-side code requires that the id source be just a single property in the data object. If you have a look at this example you will see the server returns the id to use for the row as a combined value (using a short hash).

    Are you using any of the server-side libraries we provide, or something else?

    Allan

  • pedrofdspedrofds Posts: 4Questions: 2Answers: 0

    Tks!

This discussion has been closed.