[jboss-user] [EJB 3.0] - One-To-One?how to make two tables share their primary key?
do-not-reply at jboss.com
Wed Sep 6 00:24:44 EDT 2006
you see,in Hibernate,we can set a pojo to have an one-to-one relationship with the other entity by share their primary key,for example:
| <class name="TUser"
| <one-to-one name="passport"
It is related with TPassport like:
| <class name="TPassport"
| <id name="id" column="id">
| <generator class="foreign">
| <param name="property>user</param>
| <one-to-one name="user"
| contrained="true" />
the TPassport's primary key is genearted by TUser's,how to do that in ejb3?I tried many times,but failed.who can give me an example?thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969620#3969620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969620
More information about the jboss-user