i am refering to this line @OneToMany(mappedBy="item")
what us mean mappedBy="item" ?
Samanthi,
The mappedBy element identifies the inverse side of a relationship.
The inverse side of the bidirectional relationship (OneToOne,OneToMany,ManyToMany) refer to its owining side by using the mappedBy element.
In your example, mappedBy="item" is the inverse side of the relation that is Item-> Bids and Bid->Item is the Owning side.
To fetch Bid from object from the Item class, JPA uses the attribute or property specified in the mappedBy element.
Thanks,
Ramana.