Save entities to a REST API instead of DB using Doctrine 2

前端 未结 6 696
半阙折子戏
半阙折子戏 2021-02-02 10:00

This is related to my other question: Persisting entities using a REST API.

For a project in Symfony2 I need to be able to persist entities using an remote (third-pa

6条回答
  •  野性不改
    2021-02-02 10:20

    You might use https://github.com/doctrine/rest to build a REST client, which talks to the target server. The essential part here is the mapping from entity (local) to REST API (target).

    In short: Doctrine2 (local DB) -> Rest client (entity to rest mapping) -> Request (target server)

    Doctrine/Rest provides also the other way around: a Doctrine Rest Server, to expose your local entities via REST (requests to your server). But thats not what you are looking for.

提交回复
热议问题