<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping
    xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
    http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

    <entity name="BaconUser\Entity\ResetPassword" table="reset_password">
        <indexes>
            <index name="idx_token" columns="token"/>
        </indexes>

        <id name="id" type="integer" column="reset_password_id">
            <generator strategy="AUTO"/>
        </id>

        <field name="email" type="string" length="255"/>
        <field name="token" type="string" length="40"/>
        <field name="expirationDate" type="datetime" column="expiration_date"/>
    </entity>
</doctrine-mapping>

<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping
    xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
    http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

    <entity name="BaconUser\Entity\ResetPassword" table="reset_password">
        <indexes>
            <index name="idx_email_token" columns="email,token"/>
        </indexes>

        <id name="id" type="integer" column="reset_password_id">
            <generator strategy="AUTO"/>
        </id>

        <field name="email" type="string" length="255"/>
        <field name="token" type="string" length="40"/>
        <field name="expirationDate" type="datetime" column="expiration_date"/>
    </entity>
</doctrine-mapping>

Optimize the index according to the fetch that is done
Optimize the index according to the fetch that is done
