Doctrine 2.5 allows @Embeddable and @Embedded annotations - gives developers the ability to create objects together with Value objects. If you use a composer, from May 2014 you need: "minimum-stability": "dev" in your composer.json to use it.
I have a Server object, and I'm trying to map an IpAddress value IpAddress to this. @Embeddable and @Embedded work fine here.
However, I want the Server object to have a unique constraint on the IpAddress property that maps to the value object. This will work for the regular property, but for the built-in, I get an exception when trying to update my schema from my objects:

Server entity
namespace App\Model\Entity; use App\Model\Entity\ValueObjects\Server\IpAddress, Doctrine\ORM\Mapping as ORM; class Server { private $ipAddress; }
Value IpAddress Object
namespace App\Model\Entity\ValueObjects\Server; use Doctrine\ORM\Mapping as ORM; class IpAddress { private $ipAddress; }
I suppose I'm matching classes correctly. How to place a unique constraint on an inline object? I tried the syntax . in defining the column section uniqueConstraints , but this was a complete assumption and, of course, failed.
Jimbo source share