2011-08-23 55 views
0

我有两个表(feasy_marcacao和feasy_servico)。现在我有这样的代码:从symfony中获取外部表的另一个字段

<td><?php echo $feasy_marcacao->getServicoId() ?></td> 

但这让我的身份证号码,我想该ID的说明。 这里是我的模式:

FeasyServico: 
    columns: 
    descricao: { type: string(255), notnull: true, unique: true } 

FeasyMarcacao: 
    actAs: { Timestampable: ~ } 
    columns: 
    nome: { type: string(255), notnull: true } 
    email: { type: string(255), notnull: true } 
    contacto: { type: string(255), notnull: true } 
    servico_id: { type: integer, notnull: true } 
    dia: { type: date, notnull: true } 
    hora: { type: time, notnull: true } 
    relations: 
    FeasyServico: { onDelete: CASCADE, local: servico_id, foreign: id } 

希望我解释清楚自己。感谢您的时间。

回答

2

直截了当:

echo $feasy_marcacao->getFeasyServico()->getDescricao(); 
+0

非常感谢你......它的工作的代码行..谢谢:) –

+0

保存量! –

相关问题