Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
6 subscribers
Views
2082 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hi, I was wondering wether it's possible to define a complex uniq
moritzw
over 11 years ago
Hi,
I was wondering wether it's possible to define a complex unique constraint within a cdt definition. How would I model for example a contraint like this:
CONSTRAINT uc_PersonID UNIQUE (P_Id,LastName)?
Another question I have related to this is how would I define a complex primary key?
Thanks,
Moritz...
OriginalPostID-86381
OriginalPostID-86381
Discussion posts and replies are publicly visible
0
Patty Isecke
Appian Employee
over 11 years ago
Try using the @UniqueConstraint annotation in your XSD. An example can be found here
stackoverflow.com/.../multiple-unique-constraints-in-jpa
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 11 years ago
What do you mean by a complex primary key? Can you concatenate the values and save it as a string?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
moritzw
over 11 years ago
Hi Patty,
I was talking about a primary key as used in the following table:
CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
Composite Primary Keys are not supported as described here:
forum.appian.com/.../Database_Schema_Best_Practices
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel