fix doctrine mapping

This commit is contained in:
Nicolas Lœuillet 2014-11-12 13:14:00 +01:00
parent 5ba93cdad3
commit d711a35de7
6 changed files with 23 additions and 13 deletions

View File

@ -4,7 +4,7 @@ imports:
framework:
#esi: ~
#translator: { fallback: "%locale%" }
translator: { fallback: "%locale%" }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
@ -126,9 +126,9 @@ hwi_oauth:
fos_oauth_server:
db_driver: mongodb
client_class: Wallabag\Bundle\ApiBundle\Document\Client
access_token_class: Wallabag\Bundle\ApiBundle\Document\AccessToken
refresh_token_class: Wallabag\Bundle\ApiBundle\Document\RefreshToken
auth_code_class: Wallabag\Bundle\ApiBundle\Document\AuthCode
client_class: Wallabag\Bundle\CoreBundle\Document\Client
access_token_class: Wallabag\Bundle\CoreBundle\Document\AccessToken
refresh_token_class: Wallabag\Bundle\CoreBundle\Document\RefreshToken
auth_code_class: Wallabag\Bundle\CoreBundle\Document\AuthCode
service:
user_provider: fos_user.user_manager
user_provider: fos_user.user_manager

View File

@ -3,9 +3,9 @@
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<document name="Wallabag\ApiBundle\Document\AccessToken" db="wallabag" collection="oauthAccessToken" customId="true">
<document name="Wallabag\Bundle\CoreBundle\Document\AccessToken" db="wallabag" collection="oauthAccessToken" customId="true">
<field fieldName="id" id="true" strategy="AUTO" />
<reference-one target-document="Wallabag\ApiBundle\Document\Client" field="client" />
<reference-one target-document="Wallabag\Bundle\CoreBundle\Document\Client" field="client" />
</document>
</doctrine-mongo-mapping>

View File

@ -3,9 +3,9 @@
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<document name="Wallabag\Bundle\ApiBundle\Document\AuthCode" db="wallabag" collection="oauthAuthCode" customId="true">
<document name="Wallabag\Bundle\CoreBundle\Document\AuthCode" db="wallabag" collection="oauthAuthCode" customId="true">
<field fieldName="id" id="true" strategy="AUTO" />
<reference-one target-document="Wallabag\Bundle\ApiBundle\Document\Client" field="client" />
<reference-one target-document="Wallabag\Bundle\CoreBundle\Document\Client" field="client" />
</document>
</doctrine-mongo-mapping>

View File

@ -3,7 +3,7 @@
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<document name="Wallabag\Bundle\ApiBundle\Document\Client" db="wallabag" collection="oauthClient" customId="true">
<document name="Wallabag\Bundle\CoreBundle\Document\Client" db="wallabag" collection="oauthClient" customId="true">
<field fieldName="id" id="true" strategy="AUTO" />
</document>

View File

@ -3,9 +3,9 @@
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<document name="Wallabag\Bundle\ApiBundle\Document\RefreshToken" db="=wallabag" collection="oauthRefreshToken" customId="true">
<document name="Wallabag\Bundle\CoreBundle\Document\RefreshToken" db="=wallabag" collection="oauthRefreshToken" customId="true">
<field fieldName="id" id="true" strategy="AUTO" />
<reference-one target-document="Wallabag\Bundle\ApiBundle\Document\Client" field="client" />
<reference-one target-document="Wallabag\Bundle\CoreBundle\Document\Client" field="client" />
</document>
</doctrine-mongo-mapping>

View File

@ -0,0 +1,10 @@
<doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<document name="Wallabag\Bundle\CoreBundle\Document\User" db="wallabag" collection="oauthClient" customId="true">
<field fieldName="id" id="true" strategy="AUTO" />
</document>
</doctrine-mongo-mapping>