Sunday, March 1, 2009

Re: Complex model relationship problems

The problem is completely different. I need to use $this->SpacesUser-
>find() get the Spaces which belong to a certain User (it's a HABTM
relationship), using $this->find() won't help. However, Cake confuses
itself and looks for the column parent_id in the table called
spaces_users although the model Space was set to act as a Tree. That
is the problem I'm trying to solve, sorry for confusing you :) I
simply want a nested tree (the array has "children") with the spaces
that are associated with a certain user through the SpacesUser model.

On Mar 1, 4:26 am, mscdex <msc...@gmail.com> wrote:
> On Feb 28, 6:10 pm, Dan Soendergaard <dan1...@gmail.com> wrote:
>
> > No, the function is in my model so calling $this->Space->find();
> > results in Undefined property:  Space::$Space.
>
> Sorry, I had forgotten it was a model function and not in your
> controller. It should be $this->find() in the code I posted above,
> instead.
--~--~---------~--~----~------------~-------~--~----~
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, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Editing $this->data within model's custom validation method

works for me, are you sure the custom validation in executed?

a nicer place for data manipulation is to put it in beforeSave ...

On 1 Mrz., 11:35, Turgs <timb....@gmail.com> wrote:
> Hello
>
> In cake 1.2, I have a custom validation method.
>
> Within this method, if a certain condition is met, I want to force the
> value of $this->data['Site']['name'] to 'test' simply by <?php $this-
>
> >data['Site']['name'] = 'test'; ?>.
>
> My problem is the value of $this->data['Site']['name'] doesn't change.
> Is it possible to change the value like this?
>
> Thanks
> Turgs
--~--~---------~--~----~------------~-------~--~----~
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, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: What do you develop in (ide, text editor, etc.)?

I am using dreamweaver for coding!


I've tried netBeans 7.0 for php and I love some of the features I am
missing from DW, but I still can't move from DW to NB...
What I love in DW is the great support for ftp and cvs options that
lack in NB... or it is not that good (Specially ftp) + some other
features...
In NB I love code refactoring and my own code/snippets templates (that
were already in homesite but somehow removed from DW)

and what I miss in NB is better support for js and css.. DW has great
support....

+ I miss in both support for cake :)


On Feb 28, 9:14 pm, adam <abennett...@sbcglobal.net> wrote:
> I'm using Eclipse with PDT, but Dreamweaver for making layouts.
--~--~---------~--~----~------------~-------~--~----~
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, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Editing $this->data within model's custom validation method

Hello

In cake 1.2, I have a custom validation method.

Within this method, if a certain condition is met, I want to force the
value of $this->data['Site']['name'] to 'test' simply by <?php $this-
>data['Site']['name'] = 'test'; ?>.

My problem is the value of $this->data['Site']['name'] doesn't change.
Is it possible to change the value like this?

Thanks
Turgs
--~--~---------~--~----~------------~-------~--~----~
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, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

2 foreign keys to same model?

Hi,
using cake1.2,

I came across a problem while setting up my database.
I have a question on how to set this database up by cake's convention.
I have the following 2 tables:

users
assets

each user has many assets, but any users can allow other users to
access their assets
so I figure the following, a third table is needed:

a table that has attributes:
owner, allowed

they both point to users_id, how do I make this table model in
cakephp? Is there another way to do this?
Because i know users_id means foreign key to table users, but how do
you have 2 foreign to the same table?

in short
users has many assets, any users can access other user's assets as
long as their id are on the allowed attribute of the owner id. both
columns points to the users table

thank you

--~--~---------~--~----~------------~-------~--~----~
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, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: What do you develop in (ide, text editor, etc.)?

Tried using Netbeans et al but not got into it big time yet, so still
use Notepadd++ which is an excellent text editor.
--~--~---------~--~----~------------~-------~--~----~
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, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: What do you develop in (ide, text editor, etc.)?

Does the code completion works well with netbeans?
I'm currently using Eclipse, and it's completion is not great.. for i
period i used
to work with Zend IDE ..and it was definitively great..but not free.

Does anybody is using Aptana with cakePHP ?

bye,
Andrea


On Feb 28, 11:34 pm, Gonzalo Servat <gser...@gmail.com> wrote:
> On Sat, Feb 28, 2009 at 8:06 PM, Mauricio Morales <maomora...@gmail.com>wrote:
>
>
>
> > I just downloaded Netbeans for PHP 6.5 and it's great.  I've been
> > using Eclipse for a long but I think you can enjoy Netbeans (open
> > source and works in linux, mac, windows).
>
> >http://www.netbeans.org/features/php/
>
> I second this. NetBeans for PHP 6.5 is excellent! I've stopped using Eclipse
> myself.
>
> - Gonzalo
--~--~---------~--~----~------------~-------~--~----~
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, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---