On Nov 3, 11:48 am, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> Adding __construct() to AppModel like:
> function __construct($id = false, $table = null, $ds = null) {
>         parent::__construct();
>
> }
>
> throws "No Database table for model AppModel (expected app_models),
> create it first." error with recent 1.2 svn branch.
>
> IOW, if such method is not added, there is no error.

The above code isn't correct, you are effectively resetting the
parmeters to the defaults irrespective of what the model was
instanciated with. Try passing the passed parameters to the parent
call, since that will be logically identical there sould be no error.

>
> This behavior is obvious with Andy's Generic File Upload Behavior
> toolkithttp://www.ad7six.com/MiBlog/GenericFileUploadBehavior

Yeah, erm, whoops. I need to change it there also to /not/ remove the
parameters.

Sidenote: overriding constructors should be done with extreme caution
- it's not recommended and if you do it wrong you get problems (like
this one!)

hth,

AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to