Closed mtancoigne closed 10 years ago
This error occurs for tables with parent_id: when controller is generated, it throws the error.
I tested with bake and a scaffold controller and it works. Complete controller baking does not work too, so I guess the problem comes from cake.
The problem was the following : in generated controllers, I defined a $uses
var with current model. If model was linked to other ones (hasMany, hasOne,...) the controller was unable to fetch the data. Now, the controller have a $uses=null
var if current controller has no model linked to it, and nothing if any.
When fetching data for related models, an error is thrown:
Error: Call to a member function find() on a non-object