Dealing with big cakephp applications

2013-07-29 Thread Diogo FC Patrao
Hello In my company, we develop software with cakephp for internal usage. The software is getting big for managing it as a single project (46 controllers, 94 models), and we've been thinking about splitting it in two or three different software, each to manage one different domain of the big

Custom model association column

2012-02-21 Thread Diogo FC Patrao
into Content.id field. I could do this programatically (by getting all subject_id from a Content-find('all') and then HospitalAdmission-find('all')), or putting the full relationship with Subject (which would be a little cumbersome, as I don`t really need any information in this any thoughts? -- diogo patrão

Form from another model in a view

2011-11-14 Thread Diogo
So I'm trying to extend the Blog tutorial adding some comments: Post hasMany Comments I want to display the add comment form in the same view as the 'post view'. Thing is I don't know the best way to get this approach. I thought about three ways: Creating a function in Comments Controller to

Re: Form from another model in a view

2011-11-14 Thread Diogo
That's exactly my line of thinking. I might use a comments controller if it's being used on more than one model. Other than that, I think it's not worth all the work. Thanks! On Nov 14, 2:32 pm, phpMagpie p...@webbedit.co.uk wrote: I don't think there is a right and wrong way to be honest, I

Re: SQL error 1064 in a hasMany through relationship

2011-07-20 Thread Diogo
On 20 Jul 2011, at 02:11, Diogo wrote: The error. Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index' at line 1 [CORE/cake/libs/model/ datasources

Re: SQL error 1064 in a hasMany through relationship

2011-07-19 Thread Diogo
::render() - CORE/cake/libs/controller/controller.php, line 909 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 207 On 18 jul, 18:07, Diogo dcca...@gmail.com wrote: UPDATE I created a separated project to test this. Created 3 tables (users, projects, roles). Users: id, name Projects

Re: SQL error 1064 in a hasMany through relationship

2011-07-18 Thread Diogo
this possibly be a bug? Or maybe I'm missing something very stupid here. :( On 17 jul, 12:25, Diogo dcca...@gmail.com wrote: Hi David, thank you for answering. Well I double checked the function name, where it has been created and also if the model UserRole is being loaded up (by calling

Re: SQL error 1064 in a hasMany through relationship

2011-07-17 Thread Diogo
-custom function like index, it returns me the same error. It is, as you said, the model functions aren't being loaded. I just don't know how to do it. : ( On 17 jul, 01:22, David Kullmann kullmann.da...@gmail.com wrote: Diogo: Notice how in your trace it shows this:     Model::call__() - CORE

SQL error 1064 in a hasMany through relationship

2011-07-16 Thread Diogo
I've been trying to solve this for the past 3 days and nothing has came up. I've researched a lot and this errors usually come up when CakePHP can't find my model or I have some name wrong in my relationships. Well I tried looking at everything, but still couldn't find where the error is. I have a

Control function access without Auth

2011-07-05 Thread Diogo
Hi guys. I was wondering, what is the best way to control one function access without the use of the Auth component? The main thing I wanted to do is make sure that one function can only be called through one exact view, and no one else could just type it on the address bar it. Does ACL requires

Re: Slow connection to Data base

2011-04-26 Thread Diogo Hartmann
Something interesting to add: When I use a localhost database the page are dispalyed very fast. Is anything wrong with usign an external database? Atenciosamente, Diogo Hartmann -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP

How to validate a dropdown list with months

2011-02-13 Thread Diogo
Hi! I've been seraching for weeks how to do that but didn't find any good answer. I mean I thought it was supposed to be easy to do that, but not at all. Here's the thing, I have to ask the user to choose a month interval so I can show the right data to him. Since it's not related to any table I