Re: CakePHP 3.0 - Confusion comes from

2015-04-02 Thread Dave Edwards
Hi Farid, I'm not decrying the value or usefulness of the documentation, or the huge amount of work that has gone into creating it. As this is new functionality (ORM), it needs to be put right asap, particularly as there will be few examples of this anywhere else to refer to. I could go in fi

Re: CakePHP 2 v CakePHP 3 SQL

2015-04-01 Thread Dave Edwards
x27;, 'city', 'state', 'zip_1', 'zip_2') > ) > ) > ); > > > $rental = $this->Rentals->find('all', $options)->first(); > > You can also use the w

Re: CakePHP 3.0 - Confusion comes from

2015-04-01 Thread Dave Edwards
I disagree that that the manual is fine. If Euromark is correct (and he usually is) then it is misleading. None of the examples use both. Even the section further down entitled 'Saving Entities' does not use patchEntity as well as newEntity. Dave On Tuesday, 31 March 2015 13:49:05 UTC+1, Farid

Re: CakePHP 2 v CakePHP 3 SQL

2015-03-30 Thread Dave Edwards
BUMP! On Tuesday, 24 March 2015 20:33:49 UTC, Dave Edwards wrote: > > Thanks for the reply, > > That being the case, I am pleasantly surprised that despite the > documentation making a big play on how different the new ORM is, I can (if > I choose) create my queries in

Re: CakePHP 3.0 - Confusion comes from

2015-03-30 Thread Dave Edwards
ed on from explaining how to save data to updating it. Dave On Monday, 30 March 2015 09:16:50 UTC+1, euromark wrote: > > no, patchEntity is what it is: it patches data into the entity > that is necessary for ALL forms, so both add and edit ones of course. > > > Am Sonntag, 29. März 2015

Re: CakePHP 3.0 - Confusion comes from

2015-03-29 Thread Dave Edwards
Why has the first method (which is the correct one) got both $this->Articles->newEntity() and $this->Articles->patchEntity() when you are saving a new record? I thought that newEntity was used when inserting new data, and patchEntity was for updating existing data? Is my understanding incor

Re: Very basic question about the 'CakePHP Project Files'

2015-03-26 Thread Dave Edwards
radio button has swapped back to *'the city only'* ... and even if I > click it again I can never reach the pages I need. > > There are a number of other things I'd like changed ... but knowing what > I do now ... thanks to you guys ... I assume I just need

Re: Very basic question about the 'CakePHP Project Files'

2015-03-26 Thread Dave Edwards
gt; finished it was going to be my site. I paid enough for it. > > The intention was to later, create several more sites using the same code > ... just with different content. > > Thanks again for your help ... I can stop holding my breath maybe :) > > Cheers, Roger > &

Re: Very basic question about the 'CakePHP Project Files'

2015-03-26 Thread Dave Edwards
If you have the site/application sitting on your server, that's all you will need to have the amendments made. I am of course assuming that you've full access to the server? Usually, if you have paid to have a site written, you OWN the code, unless there was some sort of other arrangement that

Re: CakePHP 2 v CakePHP 3 SQL

2015-03-24 Thread Dave Edwards
7;skirt') ), 'Lessee' => array( 'fields' => array('id', 'account', 'name', 'address_1', 'address_2', 'city', 'state', &

CakePHP 2 v CakePHP 3 SQL

2015-03-24 Thread Dave Edwards
Here is a sample of some code I use in a Trailer rental application. This is a method from the Rental Controller. Rental hasMany Trailers and hasMany Lessees public function archived($id = null) { $options = array( 'limit' => 10, 'order' => 'Trailer.number ASC',

Re: Is CakePHP dead? (Or is it just this group?)

2014-11-16 Thread Dave Edwards
t; 12))); >> >> $this->Articles->belongsTo('Authors'); >> $articles = $this->Articles->find()->contain('Authors'); // Equivalent to >> 2.x $this->Article->find('all', array('contain' => 'Author')); >>

Re: Is CakePHP dead? (Or is it just this group?)

2014-11-14 Thread Dave Edwards
On Monday, 10 November 2014 09:28:38 UTC, Lucky1968 wrote: > > I posted a few questions lately but I don't get any answers at all here. > Only 1 reply (and that wasn't even an answer to my problem) to 5 questions > or so. > > Therefor I'm asking myself if the group of CakePHP developers is blee

Re: Converting an existing site using different framework to CakePHP

2014-10-29 Thread Dave Edwards
I think re-writing the app in the new framework will be your answer. Personally I have always found it easier to port an existing app over than write one from scratch because all your functionality, layouts, and database structures should already be defined. Unless there is tons of bespoke code

Re: Comparable 2.xx to 3.xx functionality

2014-09-23 Thread Dave Edwards
re brackets, Cake 3 requires PHP 5.4, and [] is > quicker to write than array(), so it makes sense. > > And the namespacing and use's is a small price to pay for the benefits > that namespaces provide. > > Hope this clarifies things for you! > > On Sunday, 21 Septe

Re: Comparable 2.xx to 3.xx functionality

2014-09-21 Thread Dave Edwards
about the new features in the language since PHP 5.3, > specially the changes in 5.4 since you look confused about the use of > square brackets. > > On Sunday, September 21, 2014 7:43:03 PM UTC+2, Dave Edwards wrote: >> >> Thanks, but neither seem to work... >> >&

Re: Comparable 2.xx to 3.xx functionality

2014-09-21 Thread Dave Edwards
->where() to this > > $this->User->validates(array('fieldList' => array('email', 'password'))) > > Yes your controller looks just about right and it is very easy to > understand what to expect as I read further. > > HTH > > T &

Comparable 2.xx to 3.xx functionality

2014-09-21 Thread Dave Edwards
Hi, I am trying to write an app in 3.xx using functionality that I have previously used in 2.xx but despite scouring the docs, I cannot find the answers. Apologies if they are in there, but there seems to be 5x the amount of documentation especially around the new ORM. In 2.xx I could easily

Re: 3.x checking loggedin user in view/template

2014-09-17 Thread Dave Edwards
echo $auth['username']; > } > > On Monday, September 15, 2014 6:53:32 PM UTC+2, Dave Edwards wrote: >> >> In CakePHP 3.x what is the correct way to establish whether the user is >> logged in via Auth in a view/template? >> >> I found this https://

3.x checking loggedin user in view/template

2014-09-15 Thread Dave Edwards
In CakePHP 3.x what is the correct way to establish whether the user is logged in via Auth in a view/template? I found this https://github.com/cakephp/cakephp/issues/3929 which suggests that methods available in 2.x have been removed? Do I need to check in each and every controller and set some

Re: CakePHP 3 New ORM

2014-08-19 Thread Dave Edwards
cumentation on the new ORM, a lot on Controllers etc etc, but not many end to end examples (apart from the blog). Dave On Tuesday, 19 August 2014 10:16:42 UTC+1, José Lorenzo wrote: > > My answers are inline: > > On Monday, August 18, 2014 4:59:42 PM UTC+2, Dave Edwards wrote: >&g

CakePHP 3 New ORM

2014-08-18 Thread Dave Edwards
Hi, I'm having trouble getting my head around the new ways of working with the new ORM in CakePHP 3. I understand that an object is now returned instead of an array, but I find the amount of new Documentation to explain the new methods of working with Models almost overwhelming. Whilst it is c