V
V
vasenin262014-01-08 00:15:28
MODX
vasenin26, 2014-01-08 00:15:28

How can multiple constraints be described in an XPDO schema?

SQL has the following syntax to specify a multiple constraint

CREATE TABLE Customers 
          ( cnum       integer NOT NULL, 
            cname      char (10) NOT NULL, 
            city       char (10), 
            rating     integer, 
            snum       integer NOT NULL, 
            UNIQUE  (cnum, snum));

How can multiple constraints be described in an XPDO schema?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Klimchuk, 2014-01-08
@Alroniks

UNIQUE(cnum, snum) is a regular index that is added using the addIndex() method api.modx.com/revolution/2.1/_xpdo_om_xpdomanager.c... ()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question