Re: CakePHP model db joins

2011-11-29 Thread dw
I think you have your belongsTo/hasMany backwards. An artist hasMany songs, and a song belongsTo an artist. -d On Nov 28, 8:18 am, Neil Craig wrote: > Hi all > > My apologies if this has been posted already, i just can't seem to > find a solution so i am hoping someone will be kind enough to hav

Re: cakePHP 1.3 Session Flash Message Not Showing

2011-09-22 Thread dw
Make sure you have: echo $session->flash(); in your layout. I think I remember that changing from 1.2 to 1.3 -d On Sep 22, 8:19 am, Joffin Joy wrote: > Hi Sir, > > I was working with 1.2.9 for a long time and never updated the > cakephp. > > But when i updated the cake to 1.3 the save is workin

Re: Find all Posts WITHOUT Tags (habtm)

2010-05-25 Thread dw
What you want is a subquery. Check out the subquery section of this page: http://book.cakephp.org/view/74/Complex-Find-Conditions On May 24, 7:55 am, "designv...@gmail.com" wrote: > Hi All, > > I'm currently finding all Posts without Tags by querying the join > table and getting the unique Post i

Re: HABTM find query trouble

2010-05-20 Thread dw
The fundamental issue i see with your find statement: $markets = $this->Property->Market- >find('all','conditions'=>array('Property.id'=>$id)); is that you are looking for 'Property.id' on the market table. you need to change it to: $markets = $this->Property->Market- >find('all','conditions'=>a

Using pagination with added fields

2010-01-13 Thread dw
In my app i have an index of Proposals. I this view i need to show if a proposal has been rated yet by the user. What i am doing is grabbing all the proposals with a find('all'), then looping through and calling a method in the Rating model to check for ratings for that proposal by the current User

Re: Errors Sending Batch Emails

2009-12-17 Thread dw
Make sure you have: var $components = array('email'); and not: var $components = array('Email'); Oh, make sure you declared the email component in the first place :P On Dec 17, 6:57 am, damanlovett wrote: > I haven't been able to get any email success within a loop. > > On Dec 17, 5:01 am, John

Find count help

2009-10-01 Thread dw
Can someone give me a little push in the right direction on how to set up this find? Here is the model set up: Counselor hasMany Meeting hasMany Attendee All i need is an attendee count per counselor based on a meeting date range, but something in my brain is not letting me figure this out. I've

Saving hasMany with HABTM

2009-09-15 Thread dw
i could have sworn this has worked for me in the past, but in the following example i cannot get the HABTM record to save. can anyone see what i am doing wrong? Models: Meeting: var $hasMany = array( 'Appointment' => array('className' => 'Appointment',

authorize.net SIM woes

2009-07-21 Thread dw
I've been banging my head against the wall on this one for hours now, and have run out of ideas. Has anyone successfully gotten the relay response to work with authorize.net's SIM method of credit card processing? Here's my deal: The test cc is processed successfully, but i have problems getting

Re: find() and deeper associations

2008-09-09 Thread dw
You just need to set recursive to 2. On Sep 9, 8:20 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello newsgroup! > > I have defined the following associations in my models: > PostModel: "Post _hasMany_ Comments" > > var $hasMany = array( > 'Comment' => array( > 'className' => 'Co

Re: fatal error after switching database

2008-06-25 Thread dw
Ok, a bit of idiocy on my part. I did not have access to the new database. My menu element was failing and throwing off that error. Whew. On Jun 25, 2:48 pm, dw <[EMAIL PROTECTED]> wrote: > Hi All, > I made a copy of my database for testing purposes, and changed the > config/da

fatal error after switching database

2008-06-25 Thread dw
Hi All, I made a copy of my database for testing purposes, and changed the config/database.php file to point to the new database. Now, all I get the following error: Fatal error: Call to a member function trigger() on a non-object in / web/hris/docs/cake12/cake/libs/model/model.php on line 1771

Re: password not hashed by edit user

2008-06-20 Thread dw
I posted the same issue a couple months ago, and just resigned myself to the fact that i would have to manually hash the password field for my edit method. Following AD7six's tip just now, I included the username as a hidden field in the edit form and the password was hashed correctly. When i remo

Re: Auth component not hashing all passwords.

2008-04-04 Thread dw
you are expecting > > it to, but since the automatic hashing of the password prevents you > > from doing any validation on the submitted password, it is probably > > preferrable to do it manually anyways. For example, a blank password > > value will get hashed

Re: Auth component not hashing all passwords.

2008-04-04 Thread dw
Do you mean in the controllers? I do call parent::beforeFilter() in each of their beforeFilter(). On Apr 4, 11:32 am, Baz <[EMAIL PROTECTED]> wrote: > In your other models, are you calling parent::beforeFilter() in > beforeFilter? > > On Fri, Apr 4, 2008 at 1:07 PM, dw <[EM

Auth component not hashing all passwords.

2008-04-04 Thread dw
I have a User model, which has an admin_add function. The user's password is being hashed just fine. I also have an admin_pw function, with which an admin can change a user's password, and a change_pw function, which lets the user change their own password. The Auth component is not hashing passwo

Re: WAMP and CakePHP

2008-04-03 Thread dw
i use wampserver and like it. http://www.wampserver.com/ -d On Apr 2, 10:05 am, UTDStudent <[EMAIL PROTECTED]> wrote: > I am a college student who is currently trying to set up a WAMP > installation to run a school project on. Do any of you fine folks have > any recommendations for a setup. > >

How to deal with missing associated data?

2008-01-31 Thread dw
I have an Employees table, which consists of data from another source which is read-only. I have a second table, Profiles, which contains data that a user can edit. The Employees model hasOne Profile, and the Profile belongsTo the Employee. Each Profile also belongs to a Category. class Employee

Re: Problems going to production with CakePHP

2007-12-21 Thread dw
Make sure all of your .htaccess files are there. I've had issues with Filezilla and .htaccess files. Don't forget the one in webroot. On Dec 21, 9:14 am, mbavio <[EMAIL PROTECTED]> wrote: > Hi, I´m having some troubles moving my app from local to a production > enviroment. I´ve mod_rewrite ON an

Re: 1.2 Session variable disappears

2007-12-20 Thread dw
Thanks for the replies. I finally figured out that it was Firecake itself which was screwing with the session. Removing the firecake reference from the view fixed my problem. On Dec 14, 9:45 pm, jarmstrong <[EMAIL PROTECTED]> wrote: > What security level do you have your cakeapp running at? Many

Re: Session problem ....

2007-12-19 Thread dw
I have been having a similar (if not the exact) issue with 1.2. Sessions worked well in my dev setup (wamp on my laptop), but not in production. Setting the Session.checkAgent to False in config/core.php seems to have corrected the issue for me. On Dec 18, 12:18 pm, hausburger <[EMAIL PROTECTE

Re: 1.2 Session variable disappears

2007-12-14 Thread dw
tings for cake (and version, > > Security level etc ..) identical ? > > > On Dec 13, 9:13 pm, dw <[EMAIL PROTECTED]> wrote: > > > > My login function sets a session variable which contains user data. It > > > then redirects to an index page.

1.2 Session variable disappears

2007-12-13 Thread dw
My login function sets a session variable which contains user data. It then redirects to an index page. Using Firecake, i see that the session data is there: 5fbout['Sessions'] = {"Config": {"userAgent":"25fed2e5facba72bdb68484b4b19538b","time": 1197579960,"rand":2113374583},"User":{"id": 33,"us

Re: Dropdown in CakePHP

2007-10-17 Thread dw
Hi Paolo, To accomplish this, you would first set a variable in the edit function of the Post controller using generateList: $this->set('categories', $this->Post->Category- >generateList(null,'descr ASC',null,"{n}.Category.id","{n}.Category.descr")); (see Model::generateList in the API for the g

HABTM with extra data in join table

2007-10-15 Thread dw
I am having problems accessing data in a join table. I have searched and read and searched some more, but am still a bit befuddled. At first I used the 'with' condition on the HABTM association, and it worked somewhat nicely. What i had: class Trainee extends AppModel { var $name = 'Trainee'