CakePHP: "cake bake all" creates always the same code
-
03-06-2022 - |
Question
I have a problem: I have these tables in DB:
- Users
- Empresas (enterprises) ("hasMany users" and "hasMany documents")
- Documents
- And many other related to "Empresas"
And after cake bake all for "documents", the code generated for views (example Documents/view) is always the code for Users:
<div class="documentosDocs view">
<h2><?php echo __('Documentos Doc'); ?></h2>
<dl>
<dt><?php echo __('Id'); ?></dt>
<dd>
<?php echo h($user['User']['id']); ?>
</dd>
<dt><?php echo __('Empresa'); ?></dt>
<dd>
<?php echo $this->Html->link($user['Empresa']['id'], array('controller' => 'empresas', 'action' => 'view', $user['Empresa']['id'])); ?>
</dd>
<dt><?php echo __('Username'); ?></dt>
<dd>
<?php echo h($user['User']['username']); ?>
</dd>
<dt><?php echo __('Password'); ?></dt>
<dd>
<?php echo h($user['User']['password']); ?>
</dd>
<dt><?php echo __('NombreCompleto'); ?></dt>
<dd>
<?php echo h($user['User']['nombreCompleto']); ?>
</dd>
<dt><?php echo __('Email'); ?></dt>
<dd>
<?php echo h($user['User']['email']); ?>
</dd>
<dt><?php echo __('Role'); ?></dt>
<dd>
<?php echo h($user['User']['role']); ?>
</dd>
<dt><?php echo __('Group'); ?></dt>
<dd>
<?php echo $this->Html->link($user['Group']['name'], array('controller' => 'groups', 'action' => 'view', $user['Group']['id'])); ?>
</dd>
<dt><?php echo __('Created'); ?></dt>
<dd>
<?php echo h($user['User']['created']); ?>
</dd>
<dt><?php echo __('Modified'); ?></dt>
<dd>
<?php echo h($user['User']['modified']); ?>
</dd>
</dl>
</div>
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow