I'm new to Cake php.
I have a problem using bake

I set up a migration with user table

```
public $migration = array(
        'up' => array(
            'create_table' => array(
                'users' => array(
                    'user_id' => array('type' => 'integer', 'null' => false, 'key' => 'primary'),
                    'username' => array('type' => 'string', 'null' => false, 'length' => 250),
                    'password' => array('type' => 'text', 'null' => false),
                    'created' => array('type' => 'string', 'null' => false, 'length' => 14),
                    'modified' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 14),
                    'indexes' => array(
                        'PRIMARY' => array('column' => 'user_id', 'unique' => 1)
                    )
                )
            )
        ),
        'down' => array(
            'drop_table' => array(
                'users'
            )
        )
    );

```

and migrate this file on the db then I tried to do the command "cake bake all"
the problem is that User made a reference to itself with belongsTo and hasMany
is that the default of using bake?

```
class User extends AppModel {

/**
 * Validation rules
 *
 * @var array
 */
    public $validate = array(
        'user_id' => array(
            'numeric' => array(
                'rule' => array('numeric'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'username' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'date_created' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
    );

    //The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * belongsTo associations
 *
 * @var array
 */
    public $belongsTo = array(
        'User' => array(
            'className' => 'User',
            'foreignKey' => 'user_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

/**
 * hasMany associations
 *
 * @var array
 */
    public $hasMany = array(
        'User' => array(
            'className' => 'User',
            'foreignKey' => 'user_id',
            'dependent' => false,
            'conditions' => '',
            'fields' => '',
            'order' => '',
            'limit' => '',
            'offset' => '',
            'exclusive' => '',
            'finderQuery' => '',
            'counterQuery' => ''
        )
    );

}

```

is there something I missing here?
Should I leave that and modify it manually or there's a config that I missed.
['https://Stackoverflow.com/questions/26739981', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1097307/']
> 
> Today I have the need to allocate a vector with size 100000 in Matlab. 
> 
> 
> 

Now, as noted in the comments and such, the method you tried (`a=ones(100000);`) creates a 100000x100000 matrix, which is not what you want.

I would suggest you try:

```
a = ones(1, 100000);

```

Since that creates a vector rather than a matrix.
Well the first declaration tries to build a matrix of 1000000x1000000 ones. That would be **~931 GB**.

The second tries to declare a matrix of 10000 x 10000. That would be **~95MB**.

I assumed each one is stored on a byte. If they use floats, than the requested memory size will be 4 times larger.