quick entity createto get started!
Userentity Quick will assume the table name is
users. You can override this by specifying a
tablemetadata attribute on the component.
id. The name of this key can be configured by setting
variables._keyin your component.
keyTypefunction and return the desired key type from that function.
keyTypecan be any component that adheres to the
keyTypeinterface, so feel free to create your own and distribute them via ForgeBox.
persistent="false"attribute to the property. This is needed mostly when using dependency injection.
columnmetadata attribute. The attribute will be available using the
nameof the attribute.
null, you can use the
nullValuedefines the value that is considered
nullfor a attribute. By default it is an empty string. (
convertToNullis a flag that, when false, will not try to insert
nullin to the database. By default this flag is
readOnlyattribute will prevent setters, updates, and inserts to a attribute when set to
sqltypeattribute will be used when inserting or updating the attribute in the database. It will also be used when you use the attribute in a
castsattribute allows you to use a value in your CFML code as a certain type while being a different type in the database. A common example of this is a
booleanwhich is usually represented as a
BITin the database.
castsattribute must point to a WireBox mapping that resolves to a component that implements the
implementskeyword is optional.) This component defines how to
geta value from the database in to the casted value and how to
seta casted value back to the database. Below is an example of the built-in
BooleanCast, which comes bundled with Quick.
setcalled on them when persisting to the database.
Addressvalue object, for example:
persistentnor does it have a
settercreated for it.
AddressCastcomponent that handles casting the value to and from the native database values:
setfunction assigns multiple attributes from a single cast.
datasourcemetadata attribute on the component. If your extra datasource has a different grammar you can override your grammar as well by specifying a
isNotSameAsmethods. Each method takes another entity and returns
trueif the two objects represent the same entity.