 	</cfscript>
 </cffunction>
 
-<cffunction name="$objectOrNumberToKey" returntype="struct" access="public" output="false">
+<cffunction name="$setObjectOrNumberToKey" returntype="void" access="public" output="false">
 	<cfargument name="missingMethodArguments" type="struct" required="true">
 	<cfscript>
 		var loc = {};

						else if (loc.name == "newObject")
						{
							loc.method = "new";
							arguments.missingMethodArguments.properties = $foreignKeyValues(keys=loc.info.foreignKey);
						}
						else if (loc.name == "createObject")
						{
							loc.method = "create";
							arguments.missingMethodArguments.properties = $foreignKeyValues(keys=loc.info.foreignKey);
						}
						else if (loc.name == "removeObject")
						{
							loc.method = "updateOne";
							arguments.missingMethodArguments.where = loc.where;
							arguments.missingMethodArguments.properties = $foreignKeyValues(keys=loc.info.foreignKey, setToNull=true);
						}
						else if (loc.name == "deleteObject")
						{

						else if (loc.name == "addObject")
						{
							loc.method = "updateByKey";
							$setForeignKeyValues(missingMethodArguments=arguments.missingMethodArguments, keys=loc.info.foreignKey);
							$setObjectOrNumberToKey(arguments.missingMethodArguments);
						}
						else if (loc.name == "removeObject")
						{
							loc.method = "updateByKey";
							$setForeignKeyValues(missingMethodArguments=arguments.missingMethodArguments, keys=loc.info.foreignKey, setToNull=true);
							$setObjectOrNumberToKey(arguments.missingMethodArguments);
						}
						else if (loc.name == "deleteObject")
						{
							loc.method = "deleteByKey";
							$setObjectOrNumberToKey(arguments.missingMethodArguments);
						}
						else if (loc.name == "hasObjects")
						{
