I have class with many variables. Few of them are File types
class Proposal {
/**
* @ORM\ManyToOne(targetEntity="File")
* @ORM\JoinColumn(name="clientCommFile_id", referencedColumnName="id") */
private $clientCommFile;
/**
* @ORM\ManyToOne(targetEntity="File")
* @ORM\JoinColumn(name="contractFile_id", referencedColumnName="id")
*/
private $contractFile;
/**
* @ORM\ManyToOne(targetEntity="File")
* @ORM\JoinColumn(name="proposalFile_id", referencedColumnName="id")
*/
private $proposalFile;
I need do create some validation rule to validate which will inspect ids of files. The ids must be different because it referres to files in database. Is some way, how to do this?