0

我有一个问题:我在 DB 中有这些表:

  • 用户
  • Empresas(企业)(“hasMany 用户”和“hasMany 文档”)
  • 文件
  • 以及许多其他与“Empresas”相关的内容

在为“文档”烘烤所有蛋糕之后,为视图(例如文档/视图)生成的代码始终是用户的代码:

<div class="documentosDocs view">
<h2><?php  echo __('Documentos Doc'); ?></h2>
<dl>
    <dt><?php echo __('Id'); ?></dt>
    <dd>
        <?php echo h($user['User']['id']); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Empresa'); ?></dt>
    <dd>
        <?php echo $this->Html->link($user['Empresa']['id'], array('controller' => 'empresas', 'action' => 'view', $user['Empresa']['id'])); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Username'); ?></dt>
    <dd>
        <?php echo h($user['User']['username']); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Password'); ?></dt>
    <dd>
        <?php echo h($user['User']['password']); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('NombreCompleto'); ?></dt>
    <dd>
        <?php echo h($user['User']['nombreCompleto']); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Email'); ?></dt>
    <dd>
        <?php echo h($user['User']['email']); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Role'); ?></dt>
    <dd>
        <?php echo h($user['User']['role']); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Group'); ?></dt>
    <dd>
        <?php echo $this->Html->link($user['Group']['name'], array('controller' => 'groups', 'action' => 'view', $user['Group']['id'])); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Created'); ?></dt>
    <dd>
        <?php echo h($user['User']['created']); ?>
        &nbsp;
    </dd>
    <dt><?php echo __('Modified'); ?></dt>
    <dd>
        <?php echo h($user['User']['modified']); ?>
        &nbsp;
    </dd>
</dl>
</div>
4

0 回答 0