Model Module
Overview
This module is used for defining new model which represents database table. Please see also an article describing defining model using XML.
Module's schema is defined in model.xsd.
Attributes
name |
type |
required |
description |
---|---|---|---|
model |
string |
yes |
Name of the model. |
resource |
file |
yes |
Path to the file defining model. |
Example
Please find below an example of plugin defining one model module. Line 8 contains a sampleModel model which is defined in the file src/main/resources/samplePlugin/model/samplePlugin.xml.
<?xml version="1.0" encoding="UTF-8"?> <plugin plugin="samplePlugin" version="1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/plugin" xmlns:model="http://schema.qcadoo.org/modules/model" xsi:schemaLocation="http://schema.qcadoo.org/plugin http://schema.qcadoo.org/plugin.xsd http://schema.qcadoo.org/modules/model http://schema.qcadoo.org/modules/model.xsd"> <model:model model="sampleModel" resource="model/samplePlugin.xml" /> </plugin>