Return to v1.4.5 docs

table()



Use this method to tell Wheels what database table to connect to for this model. You only need to use this method when your table naming does not follow the standard Wheels convention of a singular object name mapping to a plural table name. To not use a table for your model at all, call table(false).

Name Type Required Default Description
name any Yes Name of the table to map this model to.
table(name) <!--- In models/User.cfc --->
<cffunction name="init">
    <!--- Tell Wheels to use the `tbl_USERS` table in the database for the `user` model instead of the default (which would be `users`) --->
    <cfset table("tbl_USERS")>
</cffunction>