Entities

Learn the basics of modeling ORM entities

A persistent entity is a CFML component that is marked as a database entity via the persistent annotation upon the component definition:

component persistent="true"{

}

By default, the entity name will be the CFC file name - minus the file extension, of course. We can modify the entity name via the entityname annotation:

component persistent="true" entityname="Author" {

}

And the table name via the table annotation:

component persistent="true" entityname="Author" table="authors" {

}

Here's the full list of available annotations for a persistent component:

Last updated