Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-24 Thread Mateo San Román
Hi Maybe you can do this Country hasMany State State hasMany City Country.city_id (the capital) State.city_id (the capital) I would rather go for Tree behavior. Best regards On 5 ago, 10:43, DerBjörn wrote: > Hi, > > i have three tables: countries, states and cities. > > Every coun

Re: Route passing parameters as an action as named parameters

2010-08-16 Thread Mateo San Román
;recursive' => -1, > 'conditions' =>  array('Area.slug' => $this->params['product_slug']))); >         var_dump($product); > > } > > Andras Kendehttp://www.kende.com > > On Aug 17, 2010, at 1:29 AM, Mateo San Román wrote: >

Route passing parameters as an action as named parameters

2010-08-16 Thread Mateo San Román
Hello I'm trying to route an URL like this : /area/maize to this /area/product:maize Is this possible? 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 because you are subscribed

Re: Fatal error: Call to undefined method Add::find()

2010-06-19 Thread Mateo San Román
Don't use 'Add' as a model name. Besides not having sense, it will conflict with the baked Add controller method. Best regards On 18 jun, 22:07, Davor Ilic wrote: > Do anybody know why this issue is showing??? > > what i´ve done is only to add in my method : > > $this->set('adds', $this->Add->fi

Re: edit last row in the table.

2010-05-13 Thread Mateo San Román
If you are using a UUID, you should also have a timestamp field to sort the table on that field... On 11 mayo, 22:58, Jeremy Burns wrote: > Just being picky - you don't need limit => 1 if you are doing a find first. > > Jeremy Burns > jeremybu...@me.com > > On 11 May 2010, at 23:33, Stefano Mart

Re: how write update query in cakephp

2010-05-13 Thread Mateo San Román
Something like this: On 'Tblcdlogs' Controller: function Update($id) { $this->Tblcdlog->id = $lngCDLog; $this->set('strerrordesc' => 'The CD could not be mounted. Make sure it is a valid $COMPANY_NAME Data CD.'); $this->save(); ... } Please check the manual for further explanation On 1

Routing GET parameters

2010-05-13 Thread Mateo San Román
Hello, I'm using a cake view to serve an AJAX autocomplete which is implemented in the form URL?q=[searchstring]. I cannot change that implementation and I need the URL to be in pretty form, since results are meant to be cached. Is there a way I could route /controller/search/?=:string to /control

Re: Cake 1.3 + CSS + Firefox Issues

2010-05-02 Thread Mateo San Román
Would not have thought of that on a million years... lucky me for sending a screenshot! Thank you very much. On 2 mayo, 04:27, Tomek Mazur wrote: > Supongo Adblock i bloquear dicho contenido. Trate de apagarlo y ver > si funciona. > > Echa un vistazo a la nueva CakePHP sitio Preguntashttp://cakeq

Re: Cake 1.3 + CSS + Firefox Issues

2010-05-01 Thread Mateo San Román
provide more informations, such as the CSS code that is > applied, the HTML code as it looks in FF, and whatever other code that > you deem necessary for us to assist you in clarifying the issue :) > Enjoy, >    John > > On May 2, 8:44 am, Mateo San Román wrote: > > > >

Re: Cake 1.3 + CSS + Firefox Issues

2010-05-01 Thread Mateo San Román
provide more informations, such as the CSS code that is > applied, the HTML code as it looks in FF, and whatever other code that > you deem necessary for us to assist you in clarifying the issue :) > Enjoy, >    John > > On May 2, 8:44 am, Mateo San Román wrote: > > > >

Cake 1.3 + CSS + Firefox Issues

2010-05-01 Thread Mateo San Román
Hello, I've created a baked view for a controller; when I open it with IE8 or Chrome, all view data is shown, but if I open it in Firefox the first CSS class applied (same name as controller) renders the data container hidden. Is there any way (besides deleting) to avoid this behavior? Best re

Re: Overrinding find function in behavior

2010-04-11 Thread Mateo San Román
ns-... > > But I doubt that's what you're after. > > What's this CacheBehavior supposed to do, anyway? And would it make > more sense if it was a component? > > On Apr 12, 1:09 am, Mateo San Román wrote: > > > > > Hello, > > > I'm currentl

Override model find function in behavior

2010-04-11 Thread Mateo San Román
Hello, I'm currently implementing a Model Cache behavior. In order to work without changing other behaviors, components or helpers, I need to override the default Model::find function, to work like this: In behavior: function find($conditions = null, $fields = array(), $order = null, $recursive

Overridemodel find function in behavior

2010-04-11 Thread Mateo San Román
Hello, I'm currently implementing a Model Cache behavior. In order to work without changing other behaviors, components or helpers, I need to override the default Model::find function, to work like this: In behavior: function find($conditions = null, $fields = array(), $order = null, $recursive

Overrinding find function in behavior

2010-04-11 Thread Mateo San Román
Hello, I'm currently implementing a Model Cache behavior. In order to work without changing other behaviors, components or helpers, I need to override the default Model::find function, to work like this: In behavior: function find($conditions = null, $fields = array(), $order = null, $recursiv

Re: multiple many to many tables between the same tables cakePHP

2010-03-16 Thread Mateo San Román
Hello, Since you are adding attributes to a relation, it will not be a pure "bridge table". You should create a table called "Ratings" with an attribute and the relations to musics and users tables, so it could have a view where you can add the rating attribute. Same for Privacy table. On 16 mar,

Re: Problema con safe_mode y creacion directorio/subdirectorios

2010-03-16 Thread Mateo San Román
Hola, La solución que creo más adecuada para estos casos es gestionar a los archivos mediante una aplicación, es decir, "simulando" virtualmente los directorios y almacenar estos datos ya sea en un único directorio previamente definido o en la base de datos como BLOBs... de esta manera tu aplicac

Re: do I get it? ACL's purpose

2009-08-06 Thread Mateo
Wow. Am I so far off that it would take more time than anyone wants to spend to tell me so? A vague "you got the right idea generally" or "you pretty off on some of those points" would at least give me an idea, if anyone is willing. Thanks, -Mateo On Aug 5, 2:07 pm, Mat

do I get it? ACL's purpose

2009-08-05 Thread Mateo
After some reading, tinkering, and observing, I think I'm starting to understand what Cake's ACL is supposed to do and what it isn't. If you can take issue with any point (or part of any point) below, please do so and, if you can, give an example as to how it is incorrect. Or, if you have helpfu

Re: A sample application for case study

2009-07-30 Thread Mateo
You're right. Looks like a very useful repository. Thank you! On Jul 29, 5:26 pm, Miles J wrote: > http://thechaw.com/projects > > Didnt look hard enough eh? > > On Jul 29, 2:33 pm, Mateo wrote: > > >   I've looked considerably trying to find a cakePHP ap

A sample application for case study

2009-07-29 Thread Mateo
I've looked considerably trying to find a cakePHP app I can use as a case study to learn from and, as yet, have found nothing. For example, when you download GWT, you get 'Kitchen Sink' and a few other apps to look at so you can see how things are done. It helps documentation come to life. I

Re: Struggeling with MVC and multiple views

2009-07-29 Thread Mateo
Any further input on this would be appreciated. I have a very similar question. On Jul 5, 7:45 am, Reinder wrote: > Thanks for your response, however I don't think this solves theacl > part of it, e.g. i would like to archive the following setup; > > main index page containing three elements, al

Re: transactions + redirect doesn't work!

2009-06-22 Thread Mateo San Román
Thank you for you quick answer. Any way to do that operation in a standard way? Thanks, Mateo On 22 jun, 00:45, "Adam Royle" wrote: > Yes. You must start and end atransactionwith the same mysql connection. > MySQL connections are automatically closed once the page has fini

Re: transactions + redirect doesn't work!

2009-06-21 Thread Mateo San Román
Please note, this doesn't work even if I put $this->redirect('/controller/B', null, false); Thanks On Jun 21, 11:49 pm, Mateo San Román wrote: > Hello > > I have this code: > > function A () { > $this->query('BEGIN TRANSACTION A'); &

transactions + redirect doesn't work!

2009-06-21 Thread Mateo San Román
Hello I have this code: function A () { $this->query('BEGIN TRANSACTION A'); xxx xxx $this->redirect('/controller/B); } function B () { xxx xxx $this->query('COMMIT TRANSACTION A'); } doesn't work because there is a missing "BEGIN TRANSACTION" However, if I use instead $this->quer

Get related data from HABTM

2009-06-19 Thread Mateo San Román
Hello, I have two models: Stores and Warehouse, with a HABTM relationship between them. Now, I want to get the warehouses related to a certain Store. (in other model) $warehouses = $this->Warehouse->find('all', array('contain' => 'Store')); This returns all the warehouses trimmed down at the

Folder structure

2009-05-10 Thread Mateo San Román
One thing I don't like of CakePHP is the way the folder structure is done. When working on one particular resource, you have to navigate on three different folders: (models, controllers, and views/resource). If the folder structure were resource-oriented, one could have a folder for every resource

Re: Poll: what do you hate about CakePHP?

2009-05-10 Thread Mateo San Román
Don't quite understood... You can always unbind relationships and select the fields you want with find On May 8, 6:00 am, "gaurav.v.sharma" wrote: > if one could modify the amount of data that cake fetches during any > operation. For example the action index fetches more result than > needed th

Use Javascript to clean input

2009-01-21 Thread Mateo San Román
Hello My application reads from a form input using an observeField function. Now, when the in not valid, that input should be cleaned so the following data could be validated correctly. Can anybody please give me some steps on how to accomplish this kind of behavior? Best Regards --~--~

time field not accepting 0:00

2009-01-04 Thread Mateo San Román
Hi I have a problem when I try to add a record with a time field. When I add it for the first time, and try to put the "0:00" value, cake assumes it is a null value and don't save anything in that field. If I later edit that field, that field gets the value correctly Thanks in advance. --~--

Re: Can't use internationalization on input label

2008-11-16 Thread Mateo San Román
Thanks! On Nov 15, 11:38 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: > echo $form->input('names', array( 'label' => __('Names', true))); > > On 16 Nov 2008, at 13:15, Mateo San Román wrote: > > > > > Hello > &g

Can't use internationalization on input label

2008-11-15 Thread Mateo San Román
Hello When I try to use the __() function on echo $form->input('names', array( 'label' => __('Names'))); on a view, the output shows both default table field name AND its internationalization. Thanks in advance. --~--~-~--~~~---~--~~ You received this message

Re: Distributed Cake

2008-05-20 Thread Mateo San Román
Great! I will check if this is waht I've been looking for Thank you, Gwoo! --~--~-~--~~~---~--~~ 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 unsu

Distributed Cake

2008-05-20 Thread Mateo San Román
Hi, I am currently working in a software system whose modules reside in different servers. Is there a way that Cake could use actions from remote controllers without breaking the neat syntax it has? Every idea is welcome! Best Regards, Mateo