[jboss-user] [EJB 3.0] - Re: Unknown error
fhh
do-not-reply at jboss.com
Wed May 2 08:54:39 EDT 2007
anonymous wrote :
| I've studied one to one relations and i think the error is not because of that.
|
I diagree. Look at your annotations:
@Id
@OneToOne
@JoinColumn(name="idUsuario")
public UsuarioEJB getIdUsuario() {
return this.idusuario;
}
This means that the column is primary key and foreign key as well. Either join by unsing the primary key (@PrimaryKeyJoinColumn - this did not work last time I tried on JBoss). Or use a normal FK relationshipon on the user details tables . Or simply use a secondary table mapping.
What works best for you is hard to say. I would take the secondary table approach.
Regards
Felix
Do you speak spanish?
Un pocito. Hay estudiado espanol en la univerisdad pero no hay usadolo por ochos annos. Creo que sera mejor hablar en inglese pero podemos probarlo.
Does that make some sense? :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042406#4042406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042406
More information about the jboss-user
mailing list