public function GetManyToOne($parent, $keyname)
	{
		// get the keymap for this child relationship
		$km = $this->GetKeyMap(get_class($parent), $keyname);

		// we need the value of the foreign key.  (ex. to get all orders for a customer, we need Customer.Id)
		// we also need to know the class of the object we're retrieving because if it's cached, we need to
		// make sure the model file is loaded
		$objectclass = $km->ForeignObject;
		$parent_prop = $km->KeyProperty;
		$key_value = $parent->$parent_prop;

		// get this object  Get uses caching so we don't need to bother
		$obj = $this->Get($km->ForeignObject,$key_value);

		return $obj;

	}
public function GetManyToOne($parent, $keyname)
	{
		// get the keymap for this child relationship
		$km = $this->GetKeyMap(get_class($parent), $keyname);

		// we need the value of the foreign key.  (ex. to get all orders for a customer, we need Customer.Id)
		// we also need to know the class of the object we're retrieving because if it's cached, we need to
		// make sure the model file is loaded
		$objectclass = $km->ForeignObject;
		$parent_prop = $km->KeyProperty;
		$key_value = $parent->$parent_prop;

		// get this object  Get uses caching so we don't need to bother
		$obj = $this->Get($km->ForeignObject,$key_value);

		return $obj;

	}
public function GetManyToOne ( $ parent , $ keyname ) { // get the keymap for this child relationship
 $ km = $ this -> GetKeyMap ( get_class ( $ parent ) , $ keyname ) ; // we need the value of the foreign key.  (ex. to get all orders for a customer, we need Customer.Id)
 // we also need to know the class of the object we're retrieving because if it's cached, we need to
 // make sure the model file is loaded
 $ objectclass = $ km -> ForeignObject ; $ parent_prop = $ km -> KeyProperty ; $ key_value = $ parent -> $ parent_prop ; // get this object  Get uses caching so we don't need to bother
 $ obj = $ this -> Get ( $ km -> ForeignObject , $ key_value ) ; return $ obj ; }
Query for a parent object in a many-to-one relationship

@access public
@param Phreezable $parent the parent object
@param string $keyname The name of the key representing the relationship
@return Phreezable object an object of the type specified by the KeyMap
Query for a parent object in a many - to - one relationship