Quantcast

Error to save in database

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Error to save in database

Lucas Simon Rodrigues Magalhaes
hii guys!!!

I have a error[1] in any save data of my actions in my UserController.
The error is in my function to validate[2] a add[3] user

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Error to save in database

lowpass
It's happening because Cake cannot find your User model. When you do
$this->User->something() it is usingthe AppModel instead of User
model. And so "registerValidate" is being sent directly to the
database as a query.

Is this model in a plugin? What is the file name? What does the first
line have? eg.

class User extends Appmodel {

On Fri, Aug 10, 2012 at 4:29 PM, Lucas Simon Rodrigues Magalhaes
<[hidden email]> wrote:

> hii guys!!!
>
> I have a error[1] in any save data of my actions in my UserController.
> The error is in my function to validate[2] a add[3] user
>
> [1]  http://pastebin.com/M3hSWD9k
> [2]  http://pastebin.com/9Wg1Aujm
> [3]  http://pastebin.com/rZctnxFX
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to
> [hidden email].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Error to save in database

Lucas Simon Rodrigues Magalhaes
I have a model User.php in plugin, look my gist[1] 

[1] https://gist.github.com/3340251 


Em sexta-feira, 10 de agosto de 2012 20h25min57s UTC-3, cricket escreveu:
It's happening because Cake cannot find your User model. When you do
$this->User->something() it is usingthe AppModel instead of User
model. And so "registerValidate" is being sent directly to the
database as a query.

Is this model in a plugin? What is the file name? What does the first
line have? eg.

class User extends Appmodel {

On Fri, Aug 10, 2012 at 4:29 PM, Lucas Simon Rodrigues Magalhaes
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Rk6lR3HwBmEJ">luca...@...> wrote:

> hii guys!!!
>
> I have a error[1] in any save data of my actions in my UserController.
> The error is in my function to validate[2] a add[3] user
>
> [1]  http://pastebin.com/M3hSWD9k
> [2]  http://pastebin.com/9Wg1Aujm
> [3]  http://pastebin.com/rZctnxFX
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Rk6lR3HwBmEJ">cake...@....
> To unsubscribe from this group, send email to
> <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Rk6lR3HwBmEJ">cake-php+u...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Error to save in database

Lucas Simon Rodrigues Magalhaes
I don't understand it. I define the correct names of Model Files and the cake don't recognize the model User? How?


Em segunda-feira, 13 de agosto de 2012 09h41min39s UTC-3, Lucas Simon Rodrigues Magalhaes escreveu:
I have a model User.php in plugin, look my gist[1] 

[1] https://gist.github.com/3340251 


Em sexta-feira, 10 de agosto de 2012 20h25min57s UTC-3, cricket escreveu:
It's happening because Cake cannot find your User model. When you do
$this->User->something() it is usingthe AppModel instead of User
model. And so "registerValidate" is being sent directly to the
database as a query.

Is this model in a plugin? What is the file name? What does the first
line have? eg.

class User extends Appmodel {

On Fri, Aug 10, 2012 at 4:29 PM, Lucas Simon Rodrigues Magalhaes
<[hidden email]> wrote:

> hii guys!!!
>
> I have a error[1] in any save data of my actions in my UserController.
> The error is in my function to validate[2] a add[3] user
>
> [1]  http://pastebin.com/M3hSWD9k
> [2]  http://pastebin.com/9Wg1Aujm
> [3]  http://pastebin.com/rZctnxFX
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to
> [hidden email].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Error to save in database

rchavik


On Monday, August 13, 2012 8:54:04 PM UTC+7, Lucas Simon Rodrigues Magalhaes wrote:
I don't understand it. I define the correct names of Model Files and the cake don't recognize the model User? How?

you might need to tell AuthComponent which userModel to use.

Typically, you'll tell Auth by:

$components = array(
   'Auth' => array(
     'authorize' => array(
       'userModel' => 'Plugin.User',
    )));
 


Em segunda-feira, 13 de agosto de 2012 09h41min39s UTC-3, Lucas Simon Rodrigues Magalhaes escreveu:
I have a model User.php in plugin, look my gist[1] 

[1] https://gist.github.com/3340251 


Em sexta-feira, 10 de agosto de 2012 20h25min57s UTC-3, cricket escreveu:
It's happening because Cake cannot find your User model. When you do
$this->User->something() it is usingthe AppModel instead of User
model. And so "registerValidate" is being sent directly to the
database as a query.

Is this model in a plugin? What is the file name? What does the first
line have? eg.

class User extends Appmodel {

On Fri, Aug 10, 2012 at 4:29 PM, Lucas Simon Rodrigues Magalhaes
<[hidden email]> wrote:

> hii guys!!!
>
> I have a error[1] in any save data of my actions in my UserController.
> The error is in my function to validate[2] a add[3] user
>
> [1]  http://pastebin.com/M3hSWD9k
> [2]  http://pastebin.com/9Wg1Aujm
> [3]  http://pastebin.com/rZctnxFX
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to
> [hidden email].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Error to save in database

Lucas Simon Rodrigues Magalhaes
Does not work... cake genarete a message error:
Authorization adapter &quot;userModel&quot; was not found.

Error: An Internal Error Has Occurred.

I add AppController.php in this gist[1].



[1]  https://gist.github.com/3340251 

Em segunda-feira, 13 de agosto de 2012 11h06min30s UTC-3, rchavik escreveu:


On Monday, August 13, 2012 8:54:04 PM UTC+7, Lucas Simon Rodrigues Magalhaes wrote:
I don't understand it. I define the correct names of Model Files and the cake don't recognize the model User? How?

you might need to tell AuthComponent which userModel to use.

Typically, you'll tell Auth by:

$components = array(
   'Auth' => array(
     'authorize' => array(
       'userModel' => 'Plugin.User',
    )));
 


Em segunda-feira, 13 de agosto de 2012 09h41min39s UTC-3, Lucas Simon Rodrigues Magalhaes escreveu:
I have a model User.php in plugin, look my gist[1] 

[1] https://gist.github.com/3340251 


Em sexta-feira, 10 de agosto de 2012 20h25min57s UTC-3, cricket escreveu:
It's happening because Cake cannot find your User model. When you do
$this->User->something() it is usingthe AppModel instead of User
model. And so "registerValidate" is being sent directly to the
database as a query.

Is this model in a plugin? What is the file name? What does the first
line have? eg.

class User extends Appmodel {

On Fri, Aug 10, 2012 at 4:29 PM, Lucas Simon Rodrigues Magalhaes
<[hidden email]> wrote:

> hii guys!!!
>
> I have a error[1] in any save data of my actions in my UserController.
> The error is in my function to validate[2] a add[3] user
>
> [1]  http://pastebin.com/M3hSWD9k
> [2]  http://pastebin.com/9Wg1Aujm
> [3]  http://pastebin.com/rZctnxFX
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to
> [hidden email].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Loading...