• Post Reply Bookmark Topic Watch Topic
  • New Topic

Item - Bid Bidirectional Association

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of Item-Bid Bidirectional Association, we have a addBid(Bid bid) convenience method in Item class (using which we can add a bid to item).

Why we don't have a convenience method addItem(Item item) in the Bid class as :

//Convenient Method
private void addItem(Item item)
{
this.item = item;
item.getBids().add(this);
}
?
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!