I want to implement two functions: one Entity can correspond to multiple tables during table creation. For example, I only create one FeedArchive entity but can generate a series of tables, such as feed_archive_201510, feed_archive_201511... this Entity pair can be determined at runtime... we mainly want to implement two functions:
-
One Entity can correspond to multiple tables during table creation. For example, I only create oneFeedArchiveBut can generate a series of tables suchFeed_archive_201510,Feed_archive_201511...
-
At runtime, you can decide which table the Entity corresponds.
I have tried Propel's ORM before, but I have not found a solution. I hope there is a good solution in doctrine. In addition, I recommend a better ORM library. Currently I have only used eloquent, however, eloquent depends on laravel, which is inconvenient to use independently.
Reply content:
We mainly want to implement two functions:
-
One Entity can correspond to multiple tables during table creation. For example, I only create oneFeedArchiveBut can generate a series of tables suchFeed_archive_201510,Feed_archive_201511...
-
At runtime, you can decide which table the Entity corresponds.
I have tried Propel's ORM before, but I have not found a solution. I hope there is a good solution in doctrine. In addition, I recommend a better ORM library. Currently I have only used eloquent, however, eloquent depends on laravel, which is inconvenient to use independently.