Skip to content

Property

Bases: Component

Defining and Using Literal Properties

Property Name as Type(PARAM1=value, PARAM2=value) [ Keywords ];

collection = None

Defining Collection Properties

Optional parameter used to specify if this Property should be a List or Array of the specified type

Must be "list", "array" or None

Example
Property MyProp As list of Type;
Property MyProp As array of Type;

keywords = field(default_factory=dict, kw_only=True)

Property Syntax and Keywords

Optional dict used to specify keywords for this component.

Use {"Keyword": None} for keywords that do not have a value

Valid Property keywords
  • Aliases – Specifies additional names for this property for use via object access.
  • Calculated – Specifies that this property has no in-memory storage allocated for it when the object containing it is instantiated.
  • Cardinality – Specifies the cardinality of this relationship property. Required for relationship properties. Not used for other properties.
  • ClientName – Specifies an alias used by client projections of this property.
  • Collection – Deprecated means of specifying the collection type of a collection property. Do not use.
  • ComputeLocalOnly – Controls whether a SqlComputed field is computed only on the local server for federated and shareded tables.
  • Deprecated – Specifies that this property is deprecated. This keyword is ignored by the class compiler and merely provides a human-readable indicator that the property is deprecated.
  • Final – Specifies whether this property is final (cannot be overridden in subclasses).
  • Identity – Specifies whether this property corresponds to the identity column in the corresponding SQL table. Applies to persistent classes.
  • InitialExpression – Specifies an initial value for this property.
  • Internal – Specifies whether this property definition is internal (not displayed in the class documentation). .
  • Inverse – Specifies the inverse side of this relationship. Required for relationship properties. Not used for other properties.
  • MultiDimensional – Specifies that this property has the characteristics of a multidimensional array.
  • OnDelete – Specifies the action to take in the current table when a related object is deleted. This keyword applies only to a relationship property that specifies Cardinality as Parent or One. Its use is invalid in all other contexts.
  • Private – Specifies whether the property is private (can be used only by methods of this class or its subclasses).
  • ReadOnly – Specifies that a property is read-only, which limits the number of ways its value can be set.
  • Required – For a persistent class, specifies that the property’s value must be given a value before it can be stored to disk. For an XML-enabled class, specifies that the element to which the property is mapped is required.
  • ServerOnly – Specifies whether this property is projected to a Java client.
  • SqlColumnNumber – Specifies the SQL column number for this property. Applies only to persistent classes.
  • SqlComputeCode – Specifies code that sets the value of this property.
  • SqlComputed – Specifies whether that this is a computed property.
  • SqlComputeOnChange – This keyword controls when the property is recomputed. Applies only to triggered computed properties.
  • SqlFieldName – Specifies the field name to use for this property in the SQL projection. Applies to persistent classes.
  • SqlListDelimiter – Specifies the delimiter character used within SQL for lists. Applies to list properties in persistent classes. For use only by legacy applications.
  • SqlListType – Specifies the values of this field are represented in memory in SQL and stored on disk. Applies only to list properties in persistent classes. For use only by legacy applications.
  • Transient – Specifies whether the property is stored in the database. Applies only to persistent classes.

params = field(default_factory=dict)

Property Parameters

Optional dict used to specify Property Parameters

Example
Property(
    name="MyProp", 
    type="%String",
    params={
        "XMLNAME": "my_prop",
        "MAXLEN": 10,
    },
),

type = None

Optional type of the Property