Working with Yaml, how to add composite unique constraint in doctrine 1.2.5?

–1 vote
asked Feb 8, 2016 by alwayswikhol (1,110 points)
I want to add composite unique constraint on 2 columns in Doctrine schema.

4 Answers

0 votes
answered Apr 20, 2016 by nal_6306 (520 points)
Best answer
Implements Countable interface
commented Apr 21, 2016 by nqq1054 (620 points)
So this is the complete solution
0 votes
answered Mar 18, 2016 by herout_as (430 points)
Foreign key constraints use the same naming convention as indexes.
commented Mar 20, 2016 by besides (220 points)
In the past I have just used a nested map for this
0 votes
answered Apr 20, 2016 by suddenly (850 points)

These values are validated on save Array of unique sets of fields.
Gets the array of unique fields sets.
Validates all the unique indexes.
Visit Class Doctrine_Table | Object Relational Mapper (1.2) for details
commented Apr 20, 2016 by Juul_Howe (120 points)
Perhaps this example could explain
commented Apr 21, 2016 by Jnl_8703 (150 points)
You can now populate it with your favorite text editor
0 votes
answered Apr 20, 2016 by In_860 (640 points) 1 flag
Check out Unique Constraints in the Entity Framework - Entity ... they are doing something like this
This worked for me with all the browsers I have tried

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!