Hi,
I'm trying to use single table inheritance, but the type column seems to be ignored. The scenario is like this:
I have model classes Base, with derived classes SpecialBase and ImportantBase, and a model class Test which $belongs_to = 'base'. Now I'm doing a $tests = $Test->findBySql() that is supposed to find all Test records that have associated a Base of a certain type.
The findBySql() works as expected, but when I call $test->base->load(), then $test->base->getType(), i always get 'Base', no matter what the type column of the Base record says.
Any ideas?
Regards, Tom
lazy loading works. look at this unit test
add another test if thats not reflecting your issue.
Works, ok. Problem was that I expected the type column to have the same value as returned by gettype(). ( 'ImportantBase') and not 'Important base' in the example)
Thanks!
Tom
1 to 5 of 5