Location: PHPKode > projects > MongoDB Object Document Mapper > tests/Documents/Server.php
<?php

namespace Documents;

/**
 * @Document(collection="servers")
 * @InheritanceType("SINGLE_COLLECTION")
 * @DiscriminatorField(fieldName="stype")
 * @DiscriminatorMap({
 * "server"="Server",
 * "server_guest"="GuestServer"
 * })
 */
class Server
{
    /** @Id */
    public $id;

    /** @String */
    public $name;
}
Return current item: MongoDB Object Document Mapper