Take a look at 2.2.5.3.2.2. Unidirectional in
http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.html

You have two cases for unidirectional.
1. target has cardinality many. I think @OneToMany together with @JoinTable
should be used.
2. target has cardinality 1 (not many).  I think @OneToOne together with
@JoinColumn can be used.

I don't think you have to consider the source cardinality.

/Patrik


Darth wrote:
> 
> How come JPA requires then to put different annotations based on the
> source's cardinality?
> 

I don't know, but I guess 
-- 
View this message in context: 
http://www.nabble.com/How-to-figure-out-if-a-relation-%28reference%29-is-Bi-Directional--tp18099001s17564p18105482.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to