cfproperty

Overview ColdFusion Open BlueDragon Lucee

Defines properties of a CFML component (CFC). Used to create complex data types for web services. The attributes of this tag are exposed as component metadata and are subject to inheritance rules.

Attributes

Name Required Type Default Description
access No The client security context from which the method can be invoked
9
cacheUse No String Type of cache to use
9
cascade No String Specifies which operations should be cascaded from the parent object to the associated object
9
cfc No String Name of referenced CFC
9
column No String Used to specify the primary key column name.
9
constrained No Boolean Whether a constraint is set on this table's Primary Key column to reference the Primary Key in the other table
9
dbDefault No String This sets the default value of a column in the table when schema is exported.
default No String This sets the default value on the property when the object is created.
displayname No String A value to be displayed when using introspection to show information about the CFC. The value appears in parentheses following the property name.
9
elementcolumn No String Column name in the table that is used as value in struct.
9
elementtype No String Data type of the value.
9
fetch No String Specifies if it is outer-join fetching or sequential select fetching
9
fieldtype No String This attribute is used to specify the type of the property. Use this attribute to specify the following:* Primary key: Specify fieldtype = "id" to map a property to the primary key in the table. * Column: Specify the fieldtype = "column" to map a property to a column in the table.* Relationship: Specify the fieldtype = "relationship_type". The relationship_type can be one-to-one, one-to-many, many-to-one, or many-to-many.* Version: Specify the fieldtype="version” to indicate that the column contains versioned data.* Timestamp: Specify the fieldtype="timestamp" to indicate the column contains data with timestamp.* Collection: Specify the fieldtype="collection" to define the collection mapping.
9
fkcolumn No String Specifies the foreign key column
9
formula No String SQL expression that defines the value of the property.If you specify a formula, the column value is ignored.
9
generated No String Specifies that this property value is actually generated by the database {never|always|insert}* never: Specifies that the value for this property is never generated by database* always: Specifies that the value for this property is always generated by database* insert: Specifies that the value for this property is generated at the time of insert but is not regenerated at updates.
9
generator No String Algorithm used to generate unique identifiers for instances of the persistent CFC.
9
3
getter No Boolean Specifies whether to generate getter methods or not
hint No String Text to be displayed when using introspection to show information about the CFC. This attribute can be useful for describing the purpose of the parameter.
9
index No String Specifies the name of an index that is created using the mapped column
10
indexable No Boolean false If true, marks the column for indexing. Except in the case of PK and compositekey (which are indexed if any of the non-PK property is set to indexed), the default value is false
10
indexBoost No Numeric Used to prioritize the search results. Higher the boost, more the priority. Default is 1.
10
indexFieldName No String Specifies the field name that is used in search query while indexing and performing search
10
indexLanguage No String Specify the language that is used to index and search. The value overrides the value defined in cfcomponent and the Application.cfc
10
indexStore No String false true: Stores the value in the original form, without tokenizing. false: Does not store the value. compressed: Stores the original value in a compressed form, based on Lucene implementation
10
indexTokenize No Boolean true If true, marks the column for indexing. Except in the case of PK and compositekey (which are indexed if any of the non-PK property is set to indexed), the default value is false
9
insert No Boolean Whether the column should be included in SQL UPDATE and/or INSERT tatements.Set update=false and insert=false if the column needs to be read-only.
9
inverse No Boolean A Boolean value that specifies bidirectional association
9
inversejoincolumn No String Specifies the foreign key column in the Join table that references the primary key column in the target table.
9
joinColumn No String Use this attribute to define the join column for inheritance mapping.
9
lazy No String Specifies if loading is to be done by parts:
9
length No String Use this attribute to specify the length of the column. This attribute is used for table creation only.
9
linkcatalog No String Catalog for the link table
9
linkschema No String Schema for the link table
9
linktable No String Name of the link table
9
mappedby No String Property in the target CFC that is referenced by the foreign key in the Join table.
9
missingRowIgnored No Boolean If the value is true, and the row that is referenced by the foreign key is missing, it is treated as a nullassociation. The default is false, in which case an exception occurs.
name Yes String Specifies the name of the property.
9
notnull No Boolean A Boolean value that specifies whether a notnull constriant should be added for this column.
9
optimisticLock No Boolean Whether updates to this property require acquisition of the optimistic lock on the table row
9
orderby No String Specifies the Order By string.
9
ormType No String Used to specify the data type of the primary key. If data type is not set and the ORM settinguseDBForMapping=true, then the ormtype is determined by inspecting the database.
9
params No String Additional parameters required by the various generators to generate the ID.The value for the params attribute should follow the CF Struct syntax. For example: params = {key1='value1', key2='value2'}
9
persistent No Boolean Specifies whether this property should be persisted. Ifpersistent="false” all the ORM related attributes are ignored.Set this attribute to false if you do not want this property to be persisted by ORM.
9
precision No String Specifies the precision value.
9
remotingFetch No Boolean If remotingFetch is false, then the value of that attribute is not sent over flash remoting. remotingFetch is true by default was all properties. But in case of cfcs for which persistent = true, the value of the remotingFetch attribute is false by default for any property that shares one-to-one, one-to-many, many-to-one or many-to-many relationship.
required No Boolean Whether the parameter is required
9
scale No String Specifies the scale value
9
selectkey No String The column name that is used to retrieve the primary key generated by a database trigger.
9
sequence No String Sequence key name in the database.
9
serializable No Boolean Specifies whether this property can be serialized. If you set this value tofalse, the property cannot be serialized, so any changes made are not retained on session replication, and the property has its default value (if any) on the second server. Use this attribute to prevent serializaton of properties in CFCs that are serializable.
9
3
setter No Boolean Specifies whether to generate setter methods or not
9
singularname No String Use this prperty to define the custom name for generated relationship methods. Applies to one-to-many and many-to-many
9
source No String vm Specifies the source from where the timestamp has to be retrieved
9
sqlType No String Use this attribute to specify the DB-specific SQLType that should be used for the column. This attribute is used for table creation only.If this attribute is not specified, ColdFusion will automatically decide the SQLType based on the ormtype specified for this property.
9
structkeycolumn No String The column in the target table to use as key if the collection type is struct.
9
structkeytype No String Specifies the data type of the key, when collectiontype=struct.
9
table No String Table name
type No String Specifies the ColdFusion data type for the property.
9
unique No String Specifies if there should be a unique constraint on the column.
9
uniquekey No String Groups columns in a single unique key constraint.
9
unSavedValue No String An identifier property value that indicates that an instance is newly instantiated and not saved/loaded in the database
9
update No String Whether the column should be included in the SQL update statement.Set update=false and insert=false if the column needs to be read-only.
9
validate No String Takes the validator to be used for validating data when implicit setter for this property is called.
9
validateParams No String Takes the parameters required by the validator specified in the validate attribute. This should be specified in the implicit struct notation eg. validateparams="{min=18,max=60}">.min: Minimum value if validate is integer/numeric/max: Maximum value if the validate is integer/numeric/minLength: Minimum length of the string if the validate is stringminLength: Maximum length of the string if the validate is stringpattern: regex expression if the validator specified in validate attribute is regex
9
where No String Where condition