Re: How to effectively use CakePHP Models that don't use tables?

2012-08-20 Thread ANES P.A
Hi Wayne and others, Do you get a successful working code , if so pls tell the idea ? I have 1 doubt to you why we need to use Model in this case , do we can Tackle this in Controller itself ? I am newbie , reply me Thanks Anes On Mon, Aug 20, 2012 at 3:53 PM, WayneW wrote: > Beginner here. I

Re: Multiple Database relations (HABTM and HasMany)?

2012-08-20 Thread Andrew Johnston
I won't write out the models (too tired), but I'll give you the DB structure and you can base the models off that: Table: users id (primary key) username pass Table: tasks id (primary key) user_id <--- This is the user that created the task Table users_tasks id (primary key) user_id task_id Th

Re: My auth plugin doesn't protect the rest of my application

2012-08-20 Thread Andrew Johnston
If you add a check for your Plugin's authentication in the beforeFilter() callback of your controllers it should address the problem. On Monday, August 20, 2012 8:19:25 PM UTC-4, andrewperk wrote: > > Hello, > > I've created a plugin which handles authentication(using Auth component) > for my pr

Re: PHPUnit Fixture Failure

2012-08-20 Thread Andrew Johnston
Yes, the user does. It has all privileges. On Monday, August 20, 2012 4:33:34 PM UTC-4, Jeremy Burns wrote: > > Does the test user have full access to the database (including create and > drop)? > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 20 Aug 2012, at 20:38:14, Andre

My auth plugin doesn't protect the rest of my application

2012-08-20 Thread andrewperk
Hello, I've created a plugin which handles authentication(using Auth component) for my projects. The plugin authentication works inside of the plugin itself but it does not authenticate or protect any of my controller/actions outside of the plugin. For instance my plugin: /app/Plugin/Logger

Re: PHPUnit Fixture Failure

2012-08-20 Thread AD7six
On Monday, 20 August 2012 21:38:14 UTC+2, Andrew Johnston wrote: > > Hello everyone- > > I started testing my application with PHPUnit. All of the built in > tests succeed, but the test I created failed with the following error: > > SQLSTATE[42000]: Syntax error or access violation: 1064 You hav

Re: PHPUnit Fixture Failure

2012-08-20 Thread Jeremy Burns | Class Outfit
Does the test user have full access to the database (including create and drop)? Jeremy Burns Class Outfit http://www.classoutfit.com On 20 Aug 2012, at 20:38:14, Andrew Johnston wrote: > Hello everyone- > > I started testing my application with PHPUnit. All of the built in tests > succeed,

Re: How to access base model functions from a related behavior model

2012-08-20 Thread Tilen Majerle
Ok..than its better if you create new behavior and functions you pass into it..and ijclude this behavior to all models where you need this function..:) Dne ponedeljek, 20. avgust 2012 je pošiljatelj kevin.ncbible < ke...@ncbible.com> napisal: > Thank you, Tilen -- I really appreciate you sharing y

PHPUnit Fixture Failure

2012-08-20 Thread Andrew Johnston
Hello everyone- I started testing my application with PHPUnit. All of the built in tests succeed, but the test I created failed with the following error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Re: How to access base model functions from a related behavior model

2012-08-20 Thread kevin.ncbible
Thank you, Tilen -- I really appreciate you sharing your time and talents: if you have associated Topic and TopicTree, than you can access in > controller with $this->TopicTree->Topic This first approach seems the most "elegant," but should I be trying to associate two models based on the same

Re: How to access base model functions from a related behavior model

2012-08-20 Thread Tilen Majerle
if you have associated Topic and TopicTree, than you can access in controller with $this->TopicTree->Topic, if you don't have accociated this 2 models, than you can use $this->loadModel('Topic'); in your controller, and then $this->Topic->myFunction(); -- Lep pozdrav, Tilen Majerle http://majerle.e

Re: How to effectively use CakePHP Models that don't use tables?

2012-08-20 Thread Amit
Thanks for correcting - I'm operating at 50% on Mondays. On Monday, August 20, 2012 11:43:55 AM UTC-5, Chetan Patel wrote: > > Hello friends, > > you can use below ideas, > > App::import('Model', 'Route'); > > $route1 = new Route(); > $route2 = new Route(); > > > -- > Thanks & Regards > > Chetan

HABTM pagination

2012-08-20 Thread André Luis
Hi people, i´ve searched for it but I didnt find anything wich really works. I have some Albums, wich the model is Album, and Album HABTM Gallery, so a gallery can be visible in more than one album. It works fine, BUT i need to create a pagination for galleries, and all that i´ve found here didn

Re: How to access base model functions from a related behavior model

2012-08-20 Thread kevin.ncbible
oops: in above, it should have read: e.g., my Clause model, with a one-to-one association to *Topic* -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, sen

Re: How to effectively use CakePHP Models that don't use tables?

2012-08-20 Thread Chetan Patel
Hello friends, you can use below ideas, App::import('Model', 'Route'); $route1 = new Route(); $route2 = new Route(); -- Thanks & Regards Chetan Patel -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php

How to access base model functions from a related behavior model

2012-08-20 Thread kevin.ncbible
Hi. Thank you, again, for helping. I have a basic model (Topic), with functions, e.g., MyFunction(), and another model that is a behavior (TopicTree), based on the same underlying table: public $useTable = 'topics'; public $name = 'TopicTree'; public $actsAs = array('Tree'); So,

Re: How to effectively use CakePHP Models that don't use tables?

2012-08-20 Thread Amit
try $route1 = App::import('Model', 'Route'); $route2 = App::import('Model', 'Route'); $route1->id = 2; $route2->id = 1; On Monday, August 20, 2012 5:23:36 AM UTC-5, WayneW wrote: > > Beginner here. I have a model class called "Route" and I've been > struggling to find documentation / tutorials

Re: HTTPSocket POST file upload problem

2012-08-20 Thread Stuart Bridger
Okay, I have just successfully transferred the file from the remote server to my server using cURL by first authenticating, saving a cookie and then sending another request for the file. I'll proceed with my project using this method unless I get any feedback relating to my issue with HTTPSocket

How to effectively use CakePHP Models that don't use tables?

2012-08-20 Thread WayneW
Beginner here. I have a model class called "Route" and I've been struggling to find documentation / tutorials on how to use a model that isn't based on an underlying db table. At the moment, my model has the following attributes (note that useTable is set to false): //this model does NOT use a

Fixtures problem - cakephp 2.0 unit-testing

2012-08-20 Thread Piotr Namiastka
I cant find answer how to work with fixtures, i'm working in big project and my task is to start writing tests to all system controllers nad models but i cant handle with fixtures they still give me pdo errors ; / for e.x. my fixture to UserRoleHistoryFixture.php looks this way: 'UserRoleHistor

Re: undefined index error

2012-08-20 Thread mohit kumar
yeah the problem got solved. I was making a basic error. Thanks for support :) *With Best Regards, Mohit Kumar * *+91-9582894570* On Mon, Aug 20, 2012 at 10:08 AM, Bharat Maheshwari < bharat.maheshw...@logicspice.com> wrote: > As you use all in $current_roster = $this-

Multiple Database relations (HABTM and HasMany)?

2012-08-20 Thread InJu
Hi everybody, this my first time working with CakePHP and my first big PHO project as well. I want to build the Model associations between a User and Task database. Every user has many tasks and a task can be linked to many users. As I understand HABTM-Relations this should be one. But I also

Re: Error: The requested address was not found on this server.

2012-08-20 Thread Bharat Maheshwari
Hello, I think your controller needs some modifications might be it will work *first rename the Controller/usersController.php to Controller/UsersController.php: and then in UsersController.php :- class UsersController extends AppController { public $name = "users"; publ

Re: Error: The requested address was not found on this server.

2012-08-20 Thread Luís de Sousa
Hi scs, The error I'm reporting happens with the legacy app, as I got it, without any changes applied. Here are the contents of Model/user.php: 'not_empty' ); } And the contents of Controller/usersController.php: set('usersArray', $this->user->find('all')); }