So the question is how to provide two or more identifiers keys? I couldn't find any answers on this question in google search... Here is example:
class Customer
{
/**
* @ODM\Id
*
* @JMS\Expose
* @JMS\Type("string")
*
*/
protected $id;
/**
* @var integer
* @ODM\Id(strategy="INCREMENT")
*
* @JMS\Expose
* @JMS\Type("integer")
*
*/
protected $customerId;
So in this case I have second id which increment as I wrote, but first id became null. If I remove and write just * @ODM\Field(type="integer")
everything is ok, but no increment of customerId
. So how can I have to ids in document? Or I'm wrong and I don't do this?