Created
October 9, 2014 18:44
-
-
Save mimopo/5a9a9d077283ff90e62f to your computer and use it in GitHub Desktop.
Skipper Config Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<skipper-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<orm-configuration name="Doctrine2"> | |
<element-templates> | |
<!-- Module attributes --> | |
<template element='module' use-case='update'> | |
<module import-format="Doctrine2Php" import-path="../src/Acme/Bundle/{module#CFU}Bundle/Entity"> | |
<orm-attributes> | |
<attribute name="namespace">Acme\Bundle\{module#CFU}Bundle\Entity</attribute> | |
</orm-attributes> | |
</module> | |
</template> | |
<!-- Module export naming --> | |
<template element='module' use-case='create'> | |
<module> | |
<orm-attributes> | |
<attribute name="file-suffix">without-suffix</attribute> | |
<attribute name="filename-format">entity-name-only</attribute> | |
</orm-attributes> | |
</module> | |
</template> | |
<!-- Entity table naming --> | |
<template element='entity' use-case='update'> | |
<entity> | |
<orm-attributes> | |
<attribute name="table">acme_{module#UL}_{entity#UL}</attribute> | |
</orm-attributes> | |
</entity> | |
</template> | |
<!-- Field column naming --> | |
<template element="field" use-case="update"> | |
<field> | |
<orm-attributes> | |
<attribute name="column">{field#UL}</attribute> | |
</orm-attributes> | |
</field> | |
</template> | |
<!-- Many to Many Naming --> | |
<template element='many-to-many' use-case='create'> | |
<many-to-many caption="{entity-inverse#CFU} has {entity-owner#CFU}s" mn-entity="{entity-inverse#CFU}{entity-owner#CFU}"> | |
<many-to-many-entity owning-side="true" alias="{entity-owner#CFL}s"/> | |
<many-to-many-entity owning-side="false" alias="{entity-inverse#CFL}s"/> | |
</many-to-many> | |
</template> | |
</element-templates> | |
</orm-configuration> | |
</skipper-configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment