Handling library entity
Switch statements can often be a sign that you need an extended class. Doctrine supports Inheritance Mapping. With some liberal re-factoring I created a PersonalLibrary and PurchasedLibrary, each which extend "Library". The various classes might look like this:

/**
 * @Entity(repositoryClass="LibraryRepository")
 * @InheritanceType("SINGLE_TABLE")
 * @DiscriminatorColumn(name="libraryType", type="string")
 * @DiscriminatorMap({1 = "PurchasedLibrary", 2 = "PersonalLibrary"})
 */
class Library
{
    //abbreviated class. add the properties and setters/getters as needed

    /**
     * @param \Smoovi\UserBundle\Entity\User $user
     * @param null|Library $parent
     */
    public function __construct(User $user, Library $parent = null)
    {
        $this-&gt;setUser($user);
        $this-&gt;setParent($parent);
        $this-&gt;setIndex(1);
    }

    public function setUser(User $user)
    {
        $this-&gt;user = $user;
        $this-&gt;setName($user-&gt;getFirstname()."'s Library");
    }
}

class PurchasedLibrary extends Library
{
    public function __construct(User $user, Library $parent = null)
    {
        parent::__construct($user, $parent);
        $this-&gt;setLibraryType(1);
    }

    public function setUser(User $user)
    {
        $this-&gt;setUser($user);
        $this-&gt;setName('Objects');
    }
}

class PersonalLibrary extends Library
{
    public function __construct(User $user, Library $parent = null)
    {
        parent::__construct($user, $parent);
        $this-&gt;setLibraryType(2);
    }

    public function setUser(User $user)
    {
        $this-&gt;setUser($user);
        $this-&gt;setName('Purchases');
    }
}

class LibraryRepository extends EntityRepository
{
    /**
     * Get a user's library. If unable to create, return null.
     *
     * @param \Smoovi\UserBundle\Entity\User $user
     * @param int $type
     * @return null\Library
     */
    public function getOrCreateLibrary(User $user, $type)
    {
        $parent = $this-&gt;getOrCreateParentLibrary($user);

        $sub = $this-&gt;findOneBy(array(
            'user' =&gt; $user,
            'parent' =&gt; $parent,
            'libraryType' =&gt; $type
        ));
        if (! $sub) {
            $sub = $this-&gt;createNewLibrary($user, $type, $parent);
            if (! $sub) {
                return null;
            }
        }

        $this-&gt;persist($sub);

        return $sub;
    }

    public function createNewLibrary(User $user, $type, $parent = null)
    {
        switch ($type) {
            case 1:
                return new PersonaLibrary($user, $parent);
                break;
            case 2:
                return new PurchasedLibrary($user, $parent);
                break;
        }

        return null;
    }

    private function getOrCreateParentLibrary(User $user)
    {
        $parent = $this-&gt;findOneBy(array(
            'user' =&gt; $user,
            'parent' =&gt; null,
            'libraryType' =&gt; null,
        ));
        if (! $parent) {
            $parent = new Library($user);
        }

        return $parent;
    }
}


Notes:


I'm using a Library Repository instead of a Library Manager. It's how I'd do it but, your LibraryManager may be just fine too.
I moved much of the behavior (deriving name, etc) into the setters of the Entities. This free's your Manager/Repository from this concern.
I added user and parent to the base Library Entity constructor. I'm assuming that in your domain, a Library must have a user.
It seems odd that "Index" is always 1
It seems odd that a "Top Level" table does not seem to be purchased or personal.
I would not flush the entity manager inside the those methods. Instead, I would let my calling code do it. The reason is that you may have other db operations to perform along with these. Postponing the flush operation allows you to do everything in 1 transaction.
I renamed your method names to indicate that there could be side effects as a result of calling the method (get OR create).
No need to persist parent. Persisting the sub (assuming associations are set up) should persist the parent.
I think you'll always need at least 1 switch in there somewhere that is used to construct the new entity based on it's type.