[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
Página 1 de 1

Relacionamento entre tabelas

MensagemEnviado: Seg Mai 21, 2012 6:32 pm
por gerfferson

Re: Relacionamento entre tabelas

MensagemEnviado: Ter Mai 22, 2012 12:33 pm
por rogelgarcia
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.

Re: Relacionamento entre tabelas

MensagemEnviado: Ter Mai 22, 2012 1:30 pm
por gerfferson
Ok Rogel!

Obrigado pelo retorno!

Um abraço.