DMZ 1.7.1 (DataMapper OverZealous Edition) |
[eluser]Jack Scott[/eluser]
Regarding my previous post: My app's loading models using CI->load->model(), I guess that's my bad. CI's load->model() calls _assign_libraries() on the loaded model, which causes the fatal error. My app's running under Expression Engine 2.0, which sits on top of CodeIgniter. I'm guessing EE uses an early version of CI version 2; it allows addons to be packaged into a third party directory and supports include paths for libraries and models which DataMapper's autoload() doesn't know about. That's why the app needed its models manually loaded through CI, DataMapper couldn't find 'em. I have a patch to autoload() that reads the CI include path, I'll post it if you like. While debugging the patch, I noticed autoload() fires each time ExpressionEngine loads ones of its modules or plugins. I'm not sure if that's a good thing, it could cause a problem if a plugin and model share the same name. is it worth considering letting CI load DataMapper models? I never noticed a problem with CI-loaded models under DataMapper 1.6.2 or earlier versions, and I've been working on this app for several months. Letting CI handle loading is less likely to trip up CI users new to DataMapper, and might save some problems in the future as CI grows. I like your idea of renaming _assign_libraries() to _assign_libraries_private(), that should allow models to autoload or let them load through CI. |
Welcome Guest, Not a member yet? Register Sign In |