-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: References 2 java clases to the same table of a BBDD
PostPosted: Thu Mar 26, 2009 9:38 am 
Newbie

Joined: Thu Mar 26, 2009 9:27 am
Posts: 1
Hi!

My english is not to well so I tryed to explain as better as I can. Y want to reference a table of a BBDD from 2 diferent clases, but i don't know if this is allowed whith Hibernate clauses.
The error is:
Caused by: org.hibernate.MappingException: Foreign key (FK114953E4C138BAA1:TABLE1[ROW1])) must have same number of columns as the referenced primary key...

If you can help me, I would appreciate

*********************************************************
Buenas a todos (ahora en español mi idioma)

Quiero referenciar desde dos clases a una misma tabla, porque en una voy a tratar todos los campos y en la otra voy a identificar la clave y en su hija el resto de campos (porque necesito hacer un versionado de los registros de la tabla cuando son modificados). El problema lo encuentro en que no estoy seguro si Hibernate permite referenciar desde dos clases a una misma tabla o hay que ponerla alguna cláusula especial.
si me pudieses ayudar.

Muchas gracias de antemano

Un saludo


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.