mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[Mssql 2012] Create entity for view #5074
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Slavenin on GitHub (Mar 31, 2016).
Originally assigned to: @Ocramius on GitHub.
Hello!
I created view in my db and orm file for it.
but when i run
generated sql query for create this table. Problem in vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php in getListTablesSQL and getListTableColumnsSQL in this function select object with type 'U' this phisycal table, view has type = 'V'. This class also has getListViewsSQL method, but i can not find where it using. How i can say doctrine that my entity is view?
@Slavenin commented on GitHub (Apr 12, 2016):
Is there anyone alive?
@Ocramius commented on GitHub (Apr 12, 2016):
@Slavenin doctrine doesn't understand views at all.
If you want to generate a schema with platform-specific features (in this case a view), then you will have to generate use something like doctrine/migrations and filter out what
php app/console doctrine:schema:update --dump-sqlgives you, then keep only what is relevant to you in your migration files.@postHawk commented on GitHub (Apr 13, 2016):
Ok, but why SQLServerPlatform contains methods for work with views? Perhaps i can create new orm type for view? Something like:
@Ocramius commented on GitHub (Apr 13, 2016):
@postHawk the schema manager can create views, if needed, but the ORM only deals with tables, for now