anchor.diff:  		var orderby = arguments.missingMethodName is "loadTop" ? "ORDER BY " & arguments.missingMethodArguments[2] : '';
   		var where = "1=1";
   
  -		// @TODO: create custom "getters" to dynamically bind and load realted entities.
  -
  +		// ReturnType allows us to return a different representation of the object if loading an entity or getting related entities.
  +		var returnType = "object";
  +		if( right( arguments.missingMethodName, 7 ) == "asArray" ){
  +			returnType = "array";
  +			arguments.missingMethodName = mid( arguments.missingMethodName, 1, len( arguments.missingMethodName ) - 7 );
  +		}else if( right( arguments.missingMethodName, 8 ) == "asStruct" ){
  +			returnType = "struct";
  +			arguments.missingMethodName = mid( arguments.missingMethodName, 1, len( arguments.missingMethodName ) - 8 );
  +		}else if( right( arguments.missingMethodName, 6 ) == "asJSON" ){
  +			returnType = "json";
  +			arguments.missingMethodName = mid( arguments.missingMethodName, 1, len( arguments.missingMethodName ) - 6 );
  +		}
  +
  +		// writeDump([missingMethodName,left( arguments.missingMethodName, 3 ),mid( arguments.missingMethodName, 4, len( arguments.missingMethodName ) ), missingMethodName contains "By"]);abort;
  +		if( left( arguments.missingMethodName, 3 ) is "get"){
  +			var getterInstructions = mid( arguments.missingMethodName, 4, len( arguments.missingMethodName ) );
  +
  +			if( getterInstructions does not contain "By"){
  +				// If the "getter" doesn't contain a "by" clause, we'll look to see if the current entity
  +				// has a FK matching the convention <name>_ID.  So if the method call was getUsers() and the
  +				// current entity has a users_ID property we will try to load an entity based on a Users table
  +				// and populate it with the record matching the current entitty's users_ID value.
  +				try{
  +					var newTableName = var propertyName = getterInstructions;
  +					// MANY-TO-ONE
  +					if( structKeyExists( variables, getterInstructions & "_ID" ) ){
  +						variables[ propertyName ] = this[ propertyName ] = _getManyToOne( table = lcase( newTableName ), fkColumn = getterInstructions & "_ID", returnType = returnType );
  +
  +					}else{
  +						// ONE-TO-MANY
  +						// If the current entity didn't have a FK to the table, maybe we need to load a one-to-many.
  +						// Let's try to find a table matching the getterInstructions and load all records matching the
  +						// current entity's ID value.
  +
  +						// variables[ propertyName ] = this[ propertyName ] = _getOneToMany( table = lcase( newTableName ) );
  +						writeLog('CALLING _getOneToMany() for #newTableName# #returnType#');
  +						writeDump([this,arguments]);abort;
  +						var newObj = _getOneToMany( table = lcase( newTableName ), returnType = returnType );
  +						return newObj;
  +					}
  +					return variables[ propertyName ];
  +				} catch ( any e ){
  +					if( e.type != 'BMO' ){
  +						// throw(e.detail);
  +						writeDump(e);abort;
  +					}
  +				}
  +			}else if( getterInstructions contains "By"){
  +				try{
  +					var newTableName = var propertyName = left( getterInstructions, findNoCase( 'by', getterInstructions ) - 1 );
  +					var byClause = mid( getterInstructions, findNoCase( 'by', getterInstructions ) + 2, len( getterInstructions ) );
  +
  +
  +					// writeDump([arguments,newTableName,byClause,variables[byClause],_getManyToOne( table = lcase( newTableName ), fkColumn = "modified_by_users_ID" ) ]);abort;
  +					if( structKeyExists( variables, byClause ) ){
  +						// MANY-TO-ONE
  +						// If the "getter" contains the "by" clause, we'll try to load
  +						// the child record based on the "by" clause.  For instance
  +						// if the method call was getUsersByCreated_Users_ID we would try to load
  +						// the record from the users table where users.ID == the current entity's
  +						// Created_Users_ID value.
  +						variables[ propertyName ] = this[ propertyName ] = _getManyToOne( table = lcase( newTableName ), fkColumn = byClause, returnType = returnType );
  +						return variables[ propertyName ];
  +
  +					}else{
  +						// @TODO: add support for multiple By clauses (i.e. byInvoice_NumberAndCompanies_ID)
  +						// ONE-TO-MANY
  +						// If the by clause was not a property in the current entity, we'll try to load one-to-many
  +						// records from the given table based on the by clause.
  +						// variables[ propertyName ] = this[ propertyName ] = _getOneToMany( table = lcase( newTableName ), pkValue = this.getID(), fkColumn = byClause );
  +						// return variables[ propertyName ];
  +						writeLog('CALLING _getOneToMany() for #newTableName# using byClause #byClause# #right(arguments.missingMethodName, 8)#');
  +						return _getOneToMany( table = lcase( newTableName ), pkValue = this.getID(), fkColumn = byClause, returnType = returnType );
  +
  +					}
  +
  +				} catch ( any e ){
  +					if( e.type != 'BMO' ){
  +						// throw(e.detail);
  +						writeDump(e);abort;
  +					}
  +				}
  +			}
  +			// return this;
  +		}else if( left( arguments.missingMethodName, 7 ) is "hasMany" ){
  +			// Inject array of child objects
  +			var newTableName = mid( arguments.missingMethodName, findNoCase( "hasMany", arguments.missingMethodName ) - 1, len( arguments.missingMethodName ) );
  +			writeLog('CALLING _getOneToMany() for #newTableName# using hasmany missing method handler');
  +			variables[ newTableName ] = this[ newTableName ] = _getOneToMany( table = lcase( newTableName ), returnType = returnType );
  +
  +			return this;
  +		}else if( left( arguments.missingMethodName, 9 ) is "belongsTo" ){
  +			var newTableName = mid( arguments.missingMethodName, findNoCase( "belongsTo", arguments.missingMethodName ) - 1, len( arguments.missingMethodName ) );
  +			variables[ newTableName ] = this[ newTableName ] = _getManyToOne( table = lcase( newTableName ), fkColumn = newTableName & "_ID", returnType = returnType );
  +
  +			return this;
  +		}
   
   		// Allow "loadFirst" method to instantiate the entity and load it with the first
   		// record returned per the "By" criteria
  
positive.code: 	/* properties */
  
  	property name="table" type="string" persistent="false";
  	property name="IDField" type="string" persistent="false";
  	property name="IDFieldType" type="string" persistent="false";
  	property name="IDFieldGenerator" type="string" persistent="false" ;
  
negative.code: 		}else{
  			setTable( arguments.table );
  		}
  		setParentTable( arguments.parentTable );
  		// For development use only, will drop and recreate the table in the database
  		// to give you a clean slate.
  		if( variables.dropcreate ){
  