 	'
 		<!--- Delete the user that signed up last --->
 		<cfset result = model("user").deleteOne(order="signupDate DESC")>
-	'
-	categories="model-class" chapters="deleting-records" functions="delete,deleteAll,deleteOne">
+
+		<!--- If you have a `hasOne` association setup from `user` to `profile` you can do a scoped call (the `deleteProfile` method below will call `model("profile").deleteOne(where="userId=##aUser.id##")` internally) --->
+		<cfset aUser = model("user").findByKey(params.userId)>
+		<cfset aUser.deleteProfile()>
+	'
+	categories="model-class" chapters="deleting-records,associations" functions="delete,deleteAll,deleteOne,hasOne">
 	<cfargument name="where" type="string" required="false" default="" hint="See documentation for @findAll.">
 	<cfargument name="order" type="string" required="false" default="" hint="See documentation for @findAll.">
 	<cfscript>


		<!--- Updates the object with `33` using named arguments --->
		<cfset result = model("post").updateByKey(key=33, title="New version of Wheels just released", published=1)>

		<!--- If you have a `hasOne` association setup from `author` to `bio` you can do a scoped call (the `setBio` method below will call `model("bio").updateByKey(key=aBio.id, authorId=anAuthor.id)` internally) --->
		<cfset anAuthor = model("author").findByKey(params.authorId)>
		<cfset aBio = model("bio").findByKey(params.bioId)>
		<cfset anAuthor.setBio(aBio)>

		<!--- Another example with a `hasOne` association but this time we just pass in the primary key value --->
		<cfset anAuthor = model("author").findByKey(params.authorId)>
		<cfset anAuthor.setBio(1)>

		<!--- If you have a `hasMany` association setup from `owner` to `car` you can do a scoped call (the `addCar` method below will call `model("car").updateByKey(key=aCar.id, ownerId=anOwner.id)` internally) --->
		<cfset anOwner = model("owner").findByKey(params.ownerId)>
		<cfset aCar = model("car").findByKey(params.carId)>
		<cfset anOwner.addCar(aCar)>

		<!--- Another example with a `hasMany` association --->
		<cfset anOwner = model("owner").findByKey(params.ownerId)>
		<cfset anOwner.addCar(1)>
	'
	categories="model-class" chapters="updating-records,associations" functions="hasOne,hasMany,update,updateAll,updateOne">
	<cfargument name="key" type="any" required="true" hint="See documentation for @findByKey.">

	'
		<!--- Sets the `new` property to `1` on the most recently released product --->
		<cfset result = model("product").updateOne(order="releaseDate DESC", new=1)>

		<!--- If you have a `hasOne` association setup from `user` to `profile` you can do a scoped call (the `removeProfile` method below will call `model("profile").updateOne(where="userId=##aUser.id##", userId="")` internally) --->
		<cfset aUser = model("user").findByKey(params.userId)>
		<cfset aUser.removeProfile()>
	'
	categories="model-class" chapters="updating-records,associations" functions="hasOne,update,updateAll,updateByKey">
	<cfargument name="where" type="string" required="false" default="" hint="See documentation for @findAll.">
	<cfargument name="order" type="string" required="false" default="" hint="See documentation for @findAll.">
	<cfargument name="properties" type="struct" required="false" default="#StructNew()#" hint="See documentation for @new.">
