[eluser]tpowalka[/eluser]
There is one more error.
Imagine three tables:
Code:
auctions
id
subjects
id
auctions_id
photos
id
subjects_id
there are two OneToMany definitions (in auctions.yml and subjects.yml)
Now, when I try to add new auction, it errors:
Code:
Error Number: 1054
Unknown column 'auctions_id' in 'where clause'
SELECT * FROM (`photos`) WHERE `auctions_id` = '1'
I found that error occurs in onetomany.php file. When working in subjects-photos scope (recursive, second call to OneToMany constructor), it gets the
Code:
$local_table
initialized with
Code:
$this->CI->codexadmin->db_table;
(line 14 of onetomany.php file) (the value is 'auctions' - it doesn't take the fact, that it's a recursive call, and 'master' table is different - should have the value of 'subjects').
The fast workaround of this error is to follow this line with sth like this: