[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3826: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
Next Framework • Ver Tópico - Relacionamento entre tabelas

Relacionamento entre tabelas

Não deixe de perguntar, solucione aqui suas dúvidas...

Relacionamento entre tabelas

Mensagempor gerfferson » Seg Mai 21, 2012 6:32 pm

gerfferson
 
Mensagens: 35
Data de registro: Ter Ago 30, 2011 11:27 pm

Re: Relacionamento entre tabelas

Mensagempor rogelgarcia » Ter Mai 22, 2012 12:33 pm

Antigamente, quando o Hibernate era configurado por XML era possível usar uma construção onde era possível usar duas colunas para relacionar com qualquer tipo de dados. O endereço poderia estar relacionado com cliente ou fornecedor por exemplo. De qualquer forma fazer esse relacionamento é bem complicado. Não tem documentação específica sobre isso nem na documentação do Hibernate.

Hoje, com annotations isso não é mais possível. Tem que se ter uma FK para cada tabela mesmo. É mais fácil de mapear inclusive.
rogelgarcia
Administrador
 
Mensagens: 674
Data de registro: Qua Jul 08, 2009 9:02 am

Re: Relacionamento entre tabelas

Mensagempor gerfferson » Ter Mai 22, 2012 1:30 pm

Ok Rogel!

Obrigado pelo retorno!

Um abraço.
gerfferson
 
Mensagens: 35
Data de registro: Ter Ago 30, 2011 11:27 pm


Retornar para Dúvidas

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 2 visitantes

cron