[eluser]ianbborg[/eluser]
First of all thanks for your response, secondly I resolved the problem by doing advanced relationships using the "class" and "other field" fields. For the models that don't use the same name as in the db I named the key of the relationship as the database name:
Code:
class TownsCountry extends DataMapper
{
public $table ="general_towns_country";
public function __construct()
{
// model constructor
parent::__construct();
}
}
The only problem remaining is when I try to save a TownsCountry object and I pass a Town & Country object as parameters, it doesn't seem to generate the SQL for the Country object so I save it by giving it the values instead.