Please note: this project is inactive since early 2006

2.4.4 Model

A model defines the following properties:

Prop.  Type  Default  Comment 
name string no default The name is the only mandatory arguments when instanciating a Model. Once set, it should not be changed
packageName string value of name Dynamically
adaptorName string ''  
connDict dict { 'host': '', 'database': '', 'user': '', 'password': '' }  
entities sequence [] Entities for the model are appended to this sequence.
associations sequence [] Associations are appended to this sequence.
doc string '' this is the ``comment'' field
version string no default currently '0.1' -see below

Note: For details about these properties and their meaning, please refer to 2.3.1.

When instanciated, a model should supply its name:

model = Model('AuthorBooks')

Properties can be set at instanciation time:

model = Model('AuthorBooks', adaptorName='Postgresql')

or by direct assignment:


Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted Logo