CodeIgniter Forums
Datamapper: Unable to relate word with dictionary - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Datamapper: Unable to relate word with dictionary (/showthread.php?tid=58633)



Datamapper: Unable to relate word with dictionary - El Forum - 07-02-2013

[eluser]avramovic[/eluser]
What can cause this error ("Unable to relate word with dictionary")? I have some words and some dictionaries, which are related, and everything is working fine on my localhost, but when I upload everything to my client's web server, I keep getting this error. I have checked models and they are looking fine:

Code:
class Dictionary extends DataMapper {

public $table = 'dictionaries';

public $has_many = array('word');

// ...
}

Code:
class Word extends DataMapper {

public $table = 'words';

public $has_one = array('dictionary');

// ...
}

Tables are also looking fine:

Code:
dictonaries:
id (int), auto_increment
name (varchar)

Code:
words:
id (int), auto_increment
name (varchar)
dictionary_id (int)

I don't know where else to look?

edit: Using DM 1.8.3-dev and CI 2.1.3


Datamapper: Unable to relate word with dictionary - El Forum - 07-02-2013

[eluser]avramovic[/eluser]
Ignore this, I had datamapper caching turned on and I already had old Word model which is now deleted, but the cache was left behind. I've deleted the cache and now everything works fine. I can't believe I've lost like 12 hours to find out what is the problem Sad