Please note: this project is inactive since early 2006
2.3.2 Entity
An Entity corresponds to a Class in your (UML) model.
An entity may have the following attributes:
name
:
- the name of the entity is required. It plays a fundamental
role at run-time, making it possible for the framework to make classes
correspond to DB tables and vice-versa.
className
:
- this is the name of the class bound to the current
entity. This is used both when the code-templates are generated and at
run-time, when instances from a certain type are needed to be
populated with fetched values. The value stored in the model should
therefore be kept in sync. with your current python installation.
See also:
2.3.1, Model's
'packageName'
property,
'moduleName'
(below), and
B.1,''FAQ''.
moduleName
:
- this is the name of the module where the class is
defined. This is used both when the code-templates are generated and
at run-time, when objects a certain type needs to be instanciated and
populated with fetched values. The value stored in the model should
therefore be kept in step with your current python installation.
See also:
2.3.1, Model's 'packageName'
property,
'className'
(above), and
B.1,''FAQ''.
If it is not provided, it defaults to the className
, since
a class is often declared in a module which has the same name as its
class.
externalName
:
- this is the name of the underlying table in the
database. A common habit consists in deriving it from the class name
in a consistent way, for example, class Book becomes
externalName
BOOK
, and RegularCustomer
becomes
REGULAR_CUSTOMER
.
(cf. Modeling.Entity.externalNameForInternalName() and its
2.1)
parentEntity
:
- you can choose a parent entity (a *super class*)
for your entity. Inheritance implies more than simply setting this
tag, please refer to section 2.6.4 for a
complete discussion.
primaryKeys
:
- see the next
subsection.
typeName
, isAbstract
, isReadOnly
- not used for now.
comment
:
- a comment, for maintainers of the model.
Before detailing attributes and relationships, contained in entities,
we first describe the special primary key attribute.
Footnotes
- ... its2.1
- as defined in module Entity, see
documentation
Subsections
Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted by: