Can I annotate a Document attribute to tell Skyve not to persist the attribute

Viewed 18

Can I annotate an attribute to tell Skyve not to create a database entry? (the value is transient and makes no sense storing it).

1 Answers

yes

<text name="myValue" persistent="false">
   <displayName>My Value</displayName>

typically in this case you will probably also want to turn off auditing and dirty tracking

<text name="myValue" persistent="false" audited="false" trackChanges="false">
   <displayName>My Value</displayName>
...

You can also make an entire document transient by not including the persistent declaration in the document, i.e. by removing this bit...

<persistent name="MyTableName" />

Note that if you make the whole document not persistent, then the permissions for the document in the module declaration no longer should include "CRUD..." as these are database specific - so normally for transient documents, you would assign a permission like

<role name="DataEntry">
  <description><![CDATA[Creates, maintains and enters data]]></description>
      <privileges>
          <document name="MyDocument" permission="_____"/>
...

Related