Unique constraint in DQL

Would @id not apply here?