doctrine-1.0.xsd 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsd:schema xmlns="http://symfony.com/schema/dic/doctrine"
  3. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  4. targetNamespace="http://symfony.com/schema/dic/doctrine"
  5. elementFormDefault="qualified">
  6. <xsd:element name="config">
  7. <xsd:complexType>
  8. <xsd:all>
  9. <xsd:element name="dbal" type="dbal" minOccurs="0" maxOccurs="1" />
  10. <xsd:element name="orm" type="orm" minOccurs="0" maxOccurs="1" />
  11. </xsd:all>
  12. </xsd:complexType>
  13. </xsd:element>
  14. <xsd:complexType name="named_scalar">
  15. <xsd:simpleContent>
  16. <xsd:extension base="xsd:string">
  17. <xsd:attribute name="name" type="xsd:string" use="required" />
  18. </xsd:extension>
  19. </xsd:simpleContent>
  20. </xsd:complexType>
  21. <!-- DBAL configuration -->
  22. <xsd:attributeGroup name="connection-config">
  23. <xsd:attribute name="driver" type="xsd:string" />
  24. <xsd:attribute name="driver-class" type="xsd:string" />
  25. <xsd:attribute name="wrapper-class" type="xsd:string" />
  26. <xsd:attribute name="keep-slave" type="xsd:string" />
  27. <xsd:attribute name="keep-replica" type="xsd:string" />
  28. <xsd:attribute name="platform-service" type="xsd:string" />
  29. <xsd:attribute name="shard-choser" type="xsd:string" />
  30. <xsd:attribute name="shard-choser-service" type="xsd:string" />
  31. <xsd:attribute name="auto-commit" type="xsd:string" />
  32. <xsd:attribute name="schema-filter" type="xsd:string" />
  33. <xsd:attribute name="logging" type="xsd:string" default="false" />
  34. <xsd:attribute name="profiling" type="xsd:string" default="false" />
  35. <xsd:attribute name="profiling-collect-backtrace" type="xsd:string" default="false" />
  36. <xsd:attribute name="profiling-collect-schema-errors" type="xsd:string" default="true" />
  37. <xsd:attribute name="server-version" type="xsd:string" />
  38. <xsd:attribute name="use-savepoints" type="xsd:boolean" />
  39. <xsd:attributeGroup ref="driver-config" />
  40. </xsd:attributeGroup>
  41. <xsd:attributeGroup name="driver-config">
  42. <xsd:attribute name="url" type="xsd:string" />
  43. <xsd:attribute name="dbname" type="xsd:string" />
  44. <xsd:attribute name="host" type="xsd:string" />
  45. <xsd:attribute name="port" type="xsd:string" />
  46. <xsd:attribute name="user" type="xsd:string" />
  47. <xsd:attribute name="password" type="xsd:string" />
  48. <xsd:attribute name="override-url" type="xsd:boolean" />
  49. <xsd:attribute name="application-name" type="xsd:string" />
  50. <xsd:attribute name="path" type="xsd:string" />
  51. <xsd:attribute name="unix-socket" type="xsd:string" />
  52. <xsd:attribute name="memory" type="xsd:string" />
  53. <xsd:attribute name="charset" type="xsd:string" />
  54. <xsd:attribute name="persistent" type="xsd:string" />
  55. <xsd:attribute name="protocol" type="xsd:string" />
  56. <xsd:attribute name="server" type="xsd:string" />
  57. <xsd:attribute name="service" type="xsd:string" />
  58. <xsd:attribute name="servicename" type="xsd:string" />
  59. <xsd:attribute name="session-mode" type="xsd:string" />
  60. <xsd:attribute name="default_dbname" type="xsd:string" />
  61. <xsd:attribute name="sslmode" type="xsd:string" />
  62. <xsd:attribute name="sslrootcert" type="xsd:string" />
  63. <xsd:attribute name="sslcert" type="xsd:string" />
  64. <xsd:attribute name="sslkey" type="xsd:string" />
  65. <xsd:attribute name="sslcrl" type="xsd:string" />
  66. <xsd:attribute name="pooled" type="xsd:string" />
  67. <xsd:attribute name="multiple-active-result-sets" type="xsd:string" />
  68. <xsd:attribute name="connectstring" type="xsd:string" />
  69. <xsd:attribute name="instancename" type="xsd:string" />
  70. </xsd:attributeGroup>
  71. <xsd:group name="connection-child-config">
  72. <xsd:choice>
  73. <xsd:element name="option" type="option" />
  74. <xsd:element name="mapping-type" type="named_scalar" />
  75. <xsd:element name="slave" type="replica" />
  76. <xsd:element name="replica" type="replica" />
  77. <xsd:element name="shard" type="shard" />
  78. <xsd:element name="default-table-option" type="named_scalar" />
  79. </xsd:choice>
  80. </xsd:group>
  81. <xsd:complexType name="dbal">
  82. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  83. <xsd:element name="connection" type="connection" />
  84. <xsd:element name="type" type="named_scalar" />
  85. <xsd:group ref="connection-child-config" />
  86. </xsd:choice>
  87. <xsd:attribute name="default-connection" type="xsd:string" />
  88. <xsd:attributeGroup ref="connection-config" />
  89. </xsd:complexType>
  90. <xsd:complexType name="option">
  91. <xsd:complexContent>
  92. <xsd:extension base="xsd:anyType">
  93. <xsd:attribute name="key" type="xsd:string" use="required" />
  94. </xsd:extension>
  95. </xsd:complexContent>
  96. </xsd:complexType>
  97. <xsd:complexType name="connection">
  98. <xsd:group ref="connection-child-config" minOccurs="0" maxOccurs="unbounded" />
  99. <xsd:attribute name="name" type="xsd:string" use="required" />
  100. <xsd:attributeGroup ref="connection-config" />
  101. </xsd:complexType>
  102. <xsd:complexType name="replica">
  103. <xsd:attribute name="name" type="xsd:string" use="required" />
  104. <xsd:attributeGroup ref="driver-config" />
  105. </xsd:complexType>
  106. <xsd:complexType name="shard">
  107. <xsd:attribute name="id" type="xsd:integer" use="required" />
  108. <xsd:attributeGroup ref="driver-config" />
  109. </xsd:complexType>
  110. <!-- ORM configuration -->
  111. <xsd:complexType name="mapping">
  112. <xsd:attribute name="name" type="xsd:string" use="required" />
  113. <xsd:attribute name="type" type="xsd:string" />
  114. <xsd:attribute name="dir" type="xsd:string" />
  115. <xsd:attribute name="alias" type="xsd:string" />
  116. <xsd:attribute name="prefix" type="xsd:string" />
  117. <xsd:attribute name="is-bundle" type="xsd:string" />
  118. </xsd:complexType>
  119. <xsd:complexType name="orm">
  120. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  121. <xsd:element name="entity-manager" type="entity_manager" />
  122. <xsd:element name="resolve-target-entity" type="resolve_target_entity" minOccurs="0" maxOccurs="unbounded" />
  123. <xsd:group ref="entity-manager-child-config" />
  124. </xsd:choice>
  125. <xsd:attribute name="default-entity-manager" type="xsd:string" />
  126. <xsd:attribute name="proxy-dir" type="xsd:string" />
  127. <xsd:attribute name="proxy-namespace" type="xsd:string" />
  128. <xsd:attribute name="auto-generate-proxy-classes" type="xsd:string" default="false" />
  129. <xsd:attributeGroup ref="entity-manager-config" />
  130. </xsd:complexType>
  131. <xsd:complexType name="resolve_target_entity">
  132. <xsd:simpleContent>
  133. <xsd:extension base="xsd:string">
  134. <xsd:attribute name="interface" type="xsd:string" use="required" />
  135. </xsd:extension>
  136. </xsd:simpleContent>
  137. </xsd:complexType>
  138. <xsd:simpleType name="cache_driver_type">
  139. <xsd:restriction base="xsd:token">
  140. <xsd:enumeration value="pool"/>
  141. <xsd:enumeration value="service"/>
  142. </xsd:restriction>
  143. </xsd:simpleType>
  144. <xsd:complexType name="cache_driver">
  145. <xsd:attribute name="type" type="cache_driver_type" default="pool" />
  146. <xsd:attribute name="id" type="xsd:string" />
  147. <xsd:attribute name="pool" type="xsd:string" />
  148. </xsd:complexType>
  149. <xsd:complexType name="entity_listeners">
  150. <xsd:choice minOccurs="1">
  151. <xsd:element name="entity" type="entity_listeners_entity" minOccurs="1" maxOccurs="unbounded" />
  152. </xsd:choice>
  153. </xsd:complexType>
  154. <xsd:complexType name="entity_listeners_entity">
  155. <xsd:choice minOccurs="1">
  156. <xsd:element name="listener" type="entity_listeners_listener" minOccurs="1" maxOccurs="unbounded" />
  157. </xsd:choice>
  158. <xsd:attribute name="class" type="xsd:string" />
  159. </xsd:complexType>
  160. <xsd:complexType name="entity_listeners_listener">
  161. <xsd:choice minOccurs="1">
  162. <xsd:element name="event" type="entity_listeners_event" minOccurs="1" maxOccurs="unbounded" />
  163. </xsd:choice>
  164. <xsd:attribute name="class" type="xsd:string" />
  165. </xsd:complexType>
  166. <xsd:complexType name="entity_listeners_event">
  167. <xsd:attribute name="type" type="xsd:string" />
  168. <xsd:attribute name="method" type="xsd:string" />
  169. </xsd:complexType>
  170. <xsd:complexType name="entity_manager">
  171. <xsd:group ref="entity-manager-child-config" minOccurs="0" maxOccurs="unbounded" />
  172. <xsd:attribute name="name" type="xsd:string" use="required" />
  173. <xsd:attributeGroup ref="entity-manager-config" />
  174. </xsd:complexType>
  175. <xsd:group name="entity-manager-child-config">
  176. <xsd:choice>
  177. <xsd:element name="mapping" type="mapping" />
  178. <xsd:element name="metadata-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
  179. <xsd:element name="result-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
  180. <xsd:element name="query-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
  181. <xsd:element name="dql" type="dql" minOccurs="0" maxOccurs="1" />
  182. <xsd:element name="hydrator" type="named_scalar" minOccurs="0" maxOccurs="unbounded" />
  183. <xsd:element name="filter" type="filter" minOccurs="0" maxOccurs="unbounded" />
  184. <xsd:element name="entity-listeners" type="entity_listeners" minOccurs="0" maxOccurs="1" />
  185. <xsd:element name="second-level-cache" type="second-level-cache" minOccurs="0" maxOccurs="1" />
  186. </xsd:choice>
  187. </xsd:group>
  188. <xsd:attributeGroup name="entity-manager-config">
  189. <xsd:attribute name="auto-mapping" type="xsd:string" />
  190. <xsd:attribute name="connection" type="xsd:string" />
  191. <xsd:attribute name="default-repository-class" type="xsd:string" />
  192. <xsd:attribute name="class-metadata-factory-name" type="xsd:string" />
  193. <xsd:attribute name="naming-strategy" type="xsd:string" />
  194. <xsd:attribute name="quote-strategy" type="xsd:string" />
  195. <xsd:attribute name="entity-listener-resolver" type="xsd:string" />
  196. <xsd:attribute name="repository-factory" type="xsd:string" />
  197. </xsd:attributeGroup>
  198. <xsd:complexType name="filter" mixed="true">
  199. <xsd:choice minOccurs="0">
  200. <xsd:element name="parameter" type="named_scalar" minOccurs="0" maxOccurs="unbounded" />
  201. </xsd:choice>
  202. <xsd:attribute name="name" type="xsd:string" use="required" />
  203. <xsd:attribute name="class" type="xsd:string" />
  204. <xsd:attribute name="enabled" type="xsd:boolean" />
  205. </xsd:complexType>
  206. <xsd:complexType name="second-level-cache-region" mixed="true">
  207. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  208. <xsd:element name="cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
  209. </xsd:choice>
  210. <xsd:attribute name="name" type="xsd:string" />
  211. <xsd:attribute name="type" type="xsd:string" />
  212. <xsd:attribute name="service" type="xsd:string" />
  213. <xsd:attribute name="lifetime" type="xsd:integer" />
  214. <xsd:attribute name="lock-lifetime" type="xsd:integer" />
  215. <xsd:attribute name="cache-driver" type="xsd:string" />
  216. </xsd:complexType>
  217. <xsd:complexType name="second-level-cache-logger" mixed="true">
  218. <xsd:attribute name="name" type="xsd:string" />
  219. <xsd:attribute name="service" type="xsd:string" />
  220. </xsd:complexType>
  221. <xsd:complexType name="second-level-cache" mixed="true">
  222. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  223. <xsd:element name="logger" type="second-level-cache-logger" minOccurs="0" maxOccurs="unbounded" />
  224. <xsd:element name="region" type="second-level-cache-region" minOccurs="0" maxOccurs="unbounded" />
  225. <xsd:element name="region-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
  226. </xsd:choice>
  227. <xsd:attribute name="enabled" type="xsd:boolean" default="true"/>
  228. <xsd:attribute name="log-enabled" type="xsd:boolean" default="true"/>
  229. <xsd:attribute name="factory" type="xsd:string" />
  230. <xsd:attribute name="query-validator" type="xsd:string" />
  231. <xsd:attribute name="region-lifetime" type="xsd:integer" />
  232. <xsd:attribute name="region-lock-lifetime" type="xsd:integer" />
  233. </xsd:complexType>
  234. <xsd:complexType name="dql">
  235. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  236. <xsd:element name="string-function" type="named_scalar" />
  237. <xsd:element name="numeric-function" type="named_scalar" />
  238. <xsd:element name="datetime-function" type="named_scalar" />
  239. </xsd:choice>
  240. </xsd:complexType>
  241. </xsd:schema>