[eluser]mcnux[/eluser]
I'm having trouble with non-standard models. All I want to do to start with is change the name of my model to something other than the singular name of the table.
Here's my models:
Code:
class Base_list extends DataMapperExt{
var $table = 'lists';
var $has_many = array(
'list_item'=>array()
);
}
class List_item extends DataMapperExt{
var $has_one = array(
'base_list'=>array()
);
}
Tables are something like:
Code:
lists
=====
id
title
list_items
==========
list_id
title
content
The problem occurs when I attempt to access list_items. In my application when I do something like:
Code:
$list = new Base_list($id);
$listItems = $list->list_item->get();
I get the following error: Table 'jms.list_items_lists' doesn't exist
Looks like for some reason DMZ isn't checking for the list_items table and instead is assuming I'm using a join table for the relationship?