[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) |
[eluser]OverZealous[/eluser]
@naren_nag My guess is that you have two classes with the same name somewhere. When you create the new object, it isn't a DataMapper object, but whatever the alternate is (ie: a controller, library, or something else that has the same name as the DM model). @tdktank59 I can't see what exactly is wrong, but my guess is that the query is getting cleared somehow. It usually happens when you look up an object while building a query, which can be tricky, like this: Code: // Example of what NOT to do The call to $widget->get_by_id will have reset the query. Instead, always load all of your objects at once, and build the query after, like this: Code: // Example of what to do Also, I think you should be able to safely change this: Code: // create special query section to this: Code: $problem->group_start() (Don't forget to replace all the join_related method calls with include_related. I plan on removing join_related completely when I eventually move to DMZ 2.x (but that could be years. ;-) ) |
Welcome Guest, Not a member yet? Register Sign In |