SluggedTree behavior destroys data $Model->data field

2010-02-05 Thread Tomasz Wójcik
Hi, I have a model Page which looks like this: http://pastebin.com/m7fa0d789 and SQL table that looks like this: http://pastebin.com/m55d36fb3 I'm using SluggedTree behavior in Page model to generate slugs and slug paths of every page. I have a form to edit contents of a single page. After submitt

Re: hasMany join table that stores the actual ForeignKey

2010-02-05 Thread Robert K
and actually, I don't think this meets my requirement. since i need to be able to do users<>users_addresses<>addresses and the table users_addresses is just a hasMany relationship to addresses. because these addresses are not types, they are assigned to corporations, billing, properties, clients, e

Re: hasMany join table that stores the actual ForeignKey

2010-02-05 Thread Robert K
could you possibly show me exactly how the model would look / table structure ? examples speak louder than words for me. On Feb 5, 11:58 am, John Andersen wrote: > Would it not be simpler to have the following tables and associations/ > relationships: > > Tables: users, addresses, addresstypes >

Re: friends and self HABTM

2010-02-05 Thread John Andersen
No, CakePHP uses your HABTM definition between User and Friend (User), so that it knows, that your User.id and your Friend.id must go into the users_users table. John On Feb 5, 10:23 pm, Foroct wrote: > John, > > Wouldn't that save my data to my users table and not my users_users > table?  The

Create association with a join table.

2010-02-05 Thread RhythmicDevil
Hi, having some problems understanding how to create an association between two existing records. The scenario is the following. I have recipes and menus. When viewing a recipe I want the user to be able to select a menu from a list to add the recipe to. (Menus contain Recipes). So once again, the

Re: friends and self HABTM

2010-02-05 Thread Foroct
John, Wouldn't that save my data to my users table and not my users_users table? The users_users table is where the friendships are kept. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are s

Re: hasMany join table that stores the actual ForeignKey

2010-02-05 Thread John Andersen
Would it not be simpler to have the following tables and associations/ relationships: Tables: users, addresses, addresstypes Models: User, Address, Addresstype With associations/relationships: User hasMany/belongsTo Address Address belongsTo/hasMany Addresstype Where addresstypes identifies whe

Re: friends and self HABTM

2010-02-05 Thread John Andersen
Your data structure for saving should look like this: array ( [User] => array ( [id] => 999 ) [Friend] => array ( [id] => 888 ) ) so do this: [code] if (!empty($this->data)) { $this->data['User']['id'] = $this->Auth->user('id'); if ( $this->User->save( $this->d

hasMany join table that stores the actual ForeignKey

2010-02-05 Thread Robert K
user needs to store addresses. Address table can store addresses for any type of relationship, users, companies, etc. user_addresses, company_addresses, ... addresses table (id,address1,address2,city,zip,...) user_addresses (id,user_id,address_id) company_addresses (id,company_id,address_id) so

Re: friends and self HABTM

2010-02-05 Thread Foroct
Bump- Can anyone provide some insight on this? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-ph

How create a unique default.ctp in plugins for all apps?

2010-02-05 Thread Celso
We have multiple applications reading a plugin. How to define that all applications to use as a ctp layout? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups

Re: Tabs jquery with CakePHP

2010-02-05 Thread John Andersen
Start by looking here: http://bakery.cakephp.org/articles/view/simple-tabhelper-using-jquery-ui and also, Google is your friend :) Enjoy, John On Feb 5, 6:29 pm, Mistoo wrote: > Hi, I looking for a source code, link, some example ... To understand > how work Tabs > jquery with CakePHP. There

Re: List of models

2010-02-05 Thread BrendonKoz
If that doesn't work (it might only return from the given context), you might need to look in to the ConnectionManager Class: http://api.cakephp.org/class/connection-manager -- I'd definitely try out Dr. Loboto's suggestion first though as it would be very easy to test out. On Feb 4, 10:50 pm, "D

Example de formulaire Cakephp avec Tabs & jquery

2010-02-05 Thread Mistoo
Bonjour, je viens de débuter avec CakePHP en version 1.2.4, et je cherche des examples de codes, lien, ... pour utiliser Cakephp avec Tabs & jquery. Merci Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message b

Tabs jquery with CakePHP

2010-02-05 Thread Mistoo
Hi, I looking for a source code, link, some example ... To understand how work Tabs jquery with CakePHP. There anybody can to help me. Thanks in advance Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message beca

Re: Organizing controllers in folders

2010-02-05 Thread Larry E. Masters aka PhpNut
Yes all you need to do is create the directories and move your controllers. CakePHP will find the files and cache the paths. Make sure you are developing with debug > 0 so the cache file will be refreshed as you move your files around. -- /** * @author Larry E. Masters * @var string $userName * @

Re: migrate from 1.2.3 -> 1.2.6

2010-02-05 Thread Alexandru Ciobanu
On 2/4/2010 9:18 PM, Alexandru wrote: i sow some migration guided for 1.2.4 and 1.2.5 but now i can't find them anymore because track cake move to another platform. anyone know where are the old migration guides? Alex, you don't need migration guides. Anyone on this list can confirm that su

Re: Organizing controllers in folders

2010-02-05 Thread Bryan De Asis
Hi Mandy Singh, I hope this would help you... http://bakery.cakephp.org/articles/view/flexible-controller-and-modelpaths just add another path... enableSubFoldersOn(ROOT.DS.APP_DIR.'/controllers', $controllerPaths); enableSubFoldersOn(ROOT.DS.APP_DIR.'/controllers/(subfolder)', $controllerPaths

Organizing controllers in folders

2010-02-05 Thread Mandy Singh
hi, is it possible to organize controllers under /app/controllers in sub- folders ? my module is growing huge and i would like to create sub directories under /app/controllers like "components" . let me know. i am on cakephp 1.2. thanks. Check out the new CakePHP Questions site http://cakeqs.

Re: Problem with sql joins in relations when not following cakephp conventions

2010-02-05 Thread John Andersen
I would think from what I have studied in the CakePHP manual, that your solution is not easy. One way may be for you to define the joins yourself in the find as specified here: http://book.cakephp.org/view/78/Associations-Linking-Models-Together#Joining-tables-872 Enjoy, John On Feb 5, 3:49 p

deprecation and forward migration question

2010-02-05 Thread MikeK
We are working on moving a giant app foward from 1.2.5875 pre-beta to the latest stable 1.2. When we last scoped this out a year ago ago to assess the effort all findAll calls etc were triggering the deprecation error code. When we downloaded the latest stable cake we noticed the deprecation trigge

Problem with sql joins in relations when not following cakephp conventions

2010-02-05 Thread doze
Hello, I have following database tables that are defined by the customer and cannot be changed: |---| | Tuopak | |---| | id (primarykey) | | tuopaknro | | name | | | |

Re: help!

2010-02-05 Thread Chad Smith
Is there a question here that I missed? The first thing to do is check out http://cakephp.org ... that's the first place you should go. It has plenty of documents, books, tutorials, and walk-throughs. I think everyone on this group could contest that it does have a bit of a learning curve. Espe

Re: how to validate two unique fields together?

2010-02-05 Thread sebb86
matzehahn Thanks for this link. Unfortunately this source don't worked with my edit-function (add worked). I tryed to change the source, but without success. BrendonKoz Thanks also for your help. I tryed some hours to get all this working but also without success. Fortunately, i found a link