posted 17 years ago
In The book "Hibernate In Action"
In the code provided :
Bid.java
User.java
so this means that this is unidirectional relationship from Bid to User (many to one) as we are interested in [a particular bid is place by which user] and not in [a particular user places which all bids]..
Moreover In Item.java, in placeBid() method ...
The constructor of Bid is provided as :
Why Not in this constructor itself, we add item.addBid(this); ? so it will be more logical...
[ August 31, 2007: Message edited by: Sandeep Vaid ]
[ August 31, 2007: Message edited by: Sandeep Vaid ]