Re: cakePHP 3.0.0-RC2 documentation, Testing

2015-02-16 Thread Andrew Lechowicz
So your not trying to build an app on top of CakePHP but rather I think my rule still stands here. In fact I believe that's the problem. Instead of cloning the project you created a new one which is meant to *use *the CakePHP core files and I believe tests will be set up accordingly. I think

Re: cakePHP 3.0.0-RC2 documentation, Testing

2015-02-16 Thread Lorne Dudley
Hello Andrew True, my long term goal is to submit my changes to github.But first, I have to learn how to set up a test.So I am trying to follow the simple example in the Testing chapter at this point. I am new to the world of object-oriented programming, coming from a procedure

Re: Creating Associated Records with CakePHP 3.0 ORM

2015-02-16 Thread Harold Putman
That was a clue! The problem was that I was calling patchEntity() using only the customer_id. patchEntity validates the stuff you are patching with instead of the resulting entity so, it flagged errors on the missing values. IMO that is unexpected behavior, but it can be remedied with

Re: cakePHP 3.0.0-RC2 documentation, Testing

2015-02-16 Thread Lorne Dudley
OK, I have moved ahead on the /vendor side thanks to some suggestions from Mark Story. create /web/cake3-rc2-v3 directory git clone git://github.com/cakephp/bake.git cd bake copy composer.phar to /web/cake3-rc2-v3/bake directory php composer.phar install Now, the following works.

Re: cakePHP 3.0.0-RC2 documentation, Testing

2015-02-16 Thread Lorne Dudley
Hello Andrew ! (and anyone else who wishes to contribute) Reference your comment on You should never add/edit/remove any file maintained by a package manager, I think that my case is an exception. With the assistance of another developer I have developed a fix for a cake bake issue. My

Re: Creating Associated Records with CakePHP 3.0 ORM

2015-02-16 Thread Andrew Lechowicz
Is that directly copied/pasted? If so, do you mean to have a 'Users= patchEntity' in this line: $user = $this-Customers-Users=patchEntity($user, ['customer_id' = $cr- get('id')]); Notice the double arrow (=)? On Monday, February 16, 2015 at 6:45:40 AM UTC-5, Harold Putman wrote: Hi, I am

Re: Creating Associated Records with CakePHP 3.0 ORM

2015-02-16 Thread Harold Putman
No sorry, I was retyping and my eyesight is bad ;-) What I am finding as I dig deeper is that somehow I am getting errors in the user Entity that username and password fields are required even though they are set: object(App\Model\Entity\User) { 'new' = true, 'accessible' = [ 'username' =

Creating Associated Records with CakePHP 3.0 ORM

2015-02-16 Thread Harold Putman
Hi, I am having trouble creating new records that are in a BelongsTo association Two tables: Users and Customers. User = [id, username, customer_id] Customer = [id, firstname, lastname] I have a form where someone can enter username, firstname, and lastname. I want to create a new Customer