0 votes

I followed introductions on http://help.skipper18.com/en/extending-templates and created a template file called "default_columns.skipper.cfg.xml". I have placed it in project folder where all *.ormdesigner files are. But when I'm going to create a new entity my default columns are not part of it. I have also tried to place this template file in /Applications/Skipper.app/Contents/Resources/Configurations/. Also not working.

Content of file:

<template element='entity' use-case='create' selector='primary-field'>
  <entity name="newEntity" description="Created by template">
    <field name="id" required="true" primary="true" auto-increment="true"/>
    <field name="createdAt" type="integer" size='255'/>
    <field name="updatedAt" type="integer" />
  </entity>
</template>

Best regards
Florian

in Solved by (430 points)
edited by

1 Answer

+1 vote
Best answer

Hi,
the extension file has to have also directive elements (skipper-configuration, orm-configuration,... ) to be able to parse it correctly (and because it's necessary to tell Skipper for which ORM framework you're extending it).

This means something like this:

<skipper-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <orm-configuration name="Doctrine2">
            <element-templates>
               <template element='entity' use-case='create' selector='new-project'>...
               ....

The best way how to start with templates is to edit existing Skipper configuration file. And as soon as you are satisfied with customized templates, create custom file like you're mentioning.

by Skipper developer (141k points)
selected by

Works like a charm! Thanks!