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"
| table="user"
| ......
| <one-to-one name="passport"
| class="TPassport"
| cascade="all"
| outer-join="all"
| />
| </class>
|
It is related with TPassport like:
| <class name="TPassport"
| table="user"
| >
| <id name="id" column="id">
| <generator class="foreign">
| <param name="property>user</param>
| </generator>
| </id>
| <one-to-one name="user"
| class="TUser"
| 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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...